management science 461 lecture 1b - distance metrics september 9, 2008
TRANSCRIPT
![Page 1: Management Science 461 Lecture 1b - Distance Metrics September 9, 2008](https://reader035.vdocuments.us/reader035/viewer/2022080915/56649dd45503460f94acc2ff/html5/thumbnails/1.jpg)
Management Science 461Lecture 1b - Distance Metrics
September 9, 2008
![Page 2: Management Science 461 Lecture 1b - Distance Metrics September 9, 2008](https://reader035.vdocuments.us/reader035/viewer/2022080915/56649dd45503460f94acc2ff/html5/thumbnails/2.jpg)
Distance Metrics
Without distances, DM problems usually aren’t DM problems at all
If not distances, then metrics based on distanceTimeDependencies
2
![Page 3: Management Science 461 Lecture 1b - Distance Metrics September 9, 2008](https://reader035.vdocuments.us/reader035/viewer/2022080915/56649dd45503460f94acc2ff/html5/thumbnails/3.jpg)
Location Problems
In large-scale location problems, it may be hard to obtain all distances
Consider a problem with 1000 nodes: we need a 1000x1000 distance matrix (or do we?)
Distance metrics allow us to estimate with relative accuracy, without resorting to more complicated methods
3
![Page 4: Management Science 461 Lecture 1b - Distance Metrics September 9, 2008](https://reader035.vdocuments.us/reader035/viewer/2022080915/56649dd45503460f94acc2ff/html5/thumbnails/4.jpg)
Basic Metrics
Two fundamental metrics: Euclidean and rectilinear
Rectilinear or right-angle distance metric
Euclidean or straight-line distance metric
4
![Page 5: Management Science 461 Lecture 1b - Distance Metrics September 9, 2008](https://reader035.vdocuments.us/reader035/viewer/2022080915/56649dd45503460f94acc2ff/html5/thumbnails/5.jpg)
Do maps help us?
Google Earth Pick two points – is the path between them
a grid, straight line, or some combination?
5
![Page 6: Management Science 461 Lecture 1b - Distance Metrics September 9, 2008](https://reader035.vdocuments.us/reader035/viewer/2022080915/56649dd45503460f94acc2ff/html5/thumbnails/6.jpg)
Fit a Distance Metric
6
x1 x2
y1
y2
![Page 7: Management Science 461 Lecture 1b - Distance Metrics September 9, 2008](https://reader035.vdocuments.us/reader035/viewer/2022080915/56649dd45503460f94acc2ff/html5/thumbnails/7.jpg)
Distances
Rectilinear: |x1-x2| + |y1-y2|
Euclidean: [(x1-x2)2 + (y1-y2)2]1/2
Can we combine these two into a single formula?
7
![Page 8: Management Science 461 Lecture 1b - Distance Metrics September 9, 2008](https://reader035.vdocuments.us/reader035/viewer/2022080915/56649dd45503460f94acc2ff/html5/thumbnails/8.jpg)
k and s Distance Metric
If s=1: Rectilinear metric If s=2: Euclidean metric k is a scaling factor
8
1/( , ) | | | |
ss sij i j i jd k s k x x y y
![Page 9: Management Science 461 Lecture 1b - Distance Metrics September 9, 2008](https://reader035.vdocuments.us/reader035/viewer/2022080915/56649dd45503460f94acc2ff/html5/thumbnails/9.jpg)
Fit a Distance Metric Determine the actual distances for a subset and
estimate parameters k and s
Estimate k and s by minimizing the sum of squared differences between actual and estimate distances
Choose as large and diverse a sample as possible; bigger sample means better fit
Be careful of overselecting one type!
9
![Page 10: Management Science 461 Lecture 1b - Distance Metrics September 9, 2008](https://reader035.vdocuments.us/reader035/viewer/2022080915/56649dd45503460f94acc2ff/html5/thumbnails/10.jpg)
Estimate k and s
10
i j
ijij skdLskSSE 2,,
0 and 1subject to
),(minimize
ks
skSSE
![Page 11: Management Science 461 Lecture 1b - Distance Metrics September 9, 2008](https://reader035.vdocuments.us/reader035/viewer/2022080915/56649dd45503460f94acc2ff/html5/thumbnails/11.jpg)
Straight to the answer
It may seem that the straight-line metric would be a poor approximation in most cases …
… but straight-line metric provides a surprisingly good approximation of the total distance between many pairs of points
11
![Page 12: Management Science 461 Lecture 1b - Distance Metrics September 9, 2008](https://reader035.vdocuments.us/reader035/viewer/2022080915/56649dd45503460f94acc2ff/html5/thumbnails/12.jpg)
Some real-world examples
Within the state of Wisconsin, road distances between cities are, on average, 18% longer than the straight-line metric
In Ontario, they are about 30% longer
So – when we set s = 2, then the optimal k comes out to be 1.18 and 1.30, assuming we use the same scale on the grid to generate the x and y coordinates as the scale on the map
12
![Page 13: Management Science 461 Lecture 1b - Distance Metrics September 9, 2008](https://reader035.vdocuments.us/reader035/viewer/2022080915/56649dd45503460f94acc2ff/html5/thumbnails/13.jpg)
Distances in Alberta
To model highway distances in Alberta, it is a good idea to use the rectilinear metric (s = 1).
Rural road network is a grid (two miles between E-W roads and one mile between N-S roads, with corrections)
Travel distances can be approximated quite accurately using the rectilinear metric
13
![Page 14: Management Science 461 Lecture 1b - Distance Metrics September 9, 2008](https://reader035.vdocuments.us/reader035/viewer/2022080915/56649dd45503460f94acc2ff/html5/thumbnails/14.jpg)
Distance Metrics – Final Note
In some instances, actual distances will be longer (due to rivers, mountains), and in other instances, actual distances will be shorter (interprovincial highways)
Note the difference between distance and time travelled
14