Commit 77e44f2
Alex J Lennon
Fix average error calculation - was incorrectly using squared errors
- Replace incorrect error calculation that used squared errors and divided by half node count
- Calculate true average linear error across all edges
- Add min/max error and edge count to diagnostic logging
Issue:
- Old calculation: sum of squared errors / (node count * 0.5)
- This gave massively inflated error values (~36km)
- Was using mean squared error instead of mean error
Solution:
- Calculate actual error (not squared) for each edge
- Sum all errors and divide by total edge count
- This gives true average error in meters
Results:
- Error dropped from ~36,000m to ~63m
- Much more realistic error reporting
- Added diagnostic info: min/max error and edge count1 parent b1d650e commit 77e44f2
1 file changed
+21
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
354 | 354 | | |
355 | 355 | | |
356 | 356 | | |
| 357 | + | |
357 | 358 | | |
358 | | - | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
359 | 363 | | |
360 | 364 | | |
361 | | - | |
362 | | - | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
363 | 377 | | |
364 | | - | |
365 | 378 | | |
366 | | - | |
367 | | - | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
368 | 383 | | |
369 | 384 | | |
370 | 385 | | |
| |||
0 commit comments