Ryan Curtin
|
3f763886f3
|
Always mark the owner. This fixes some unusual and unexpected floating point errors where the owner will not actually be set.
|
2015-03-12 15:42:46 -04:00 |
|
Ryan Curtin
|
43ab267514
|
Make traversal depth-first in the queries. This results in less memory usage, and some amount of speedup.
|
2015-03-12 15:42:46 -04:00 |
|
Ryan Curtin
|
5ee125c678
|
Fix a bug where we pruned too tightly. Provide a little more debugging output for errors, too (but this debugging is commented out by default).
|
2015-03-12 15:42:46 -04:00 |
|
Ryan Curtin
|
8d30f34835
|
More accurate counting of calculations.
|
2015-03-12 15:42:46 -04:00 |
|
Ryan Curtin
|
4003537371
|
Make the search *actually* breadth-first. Significant speedups result!
|
2015-03-12 15:42:46 -04:00 |
|
Ryan Curtin
|
727edc7a24
|
Use one-leaf trees for better performance.
|
2015-03-12 15:42:46 -04:00 |
|
Ryan Curtin
|
01ec8a54be
|
A tighter, but random, prune. Minor speedup. Also add a commented-out check for the lower bounds, and fix a minor bug that screwed them up.
|
2015-03-12 15:42:46 -04:00 |
|
Ryan Curtin
|
b2fc22aefd
|
Pre-emptive prunes. Potentially a slowdown. Not always, though, I don't think. I may revert this.
|
2015-03-12 15:42:46 -04:00 |
|
Ryan Curtin
|
030d36d7fa
|
Implement Rescore(). Minor speedup.
|
2015-03-12 15:42:46 -04:00 |
|
Ryan Curtin
|
536c639f88
|
Prune nodes whose points and children are pruned. This gives significant speedup, and on my little test dataset, this is the fastest algorithm yet that I have created.
|
2015-03-12 15:42:46 -04:00 |
|
Ryan Curtin
|
078eef08d5
|
Update lower bounds when possible. Surprisingly, no speedup anywhere?
|
2015-03-12 15:42:46 -04:00 |
|
Ryan Curtin
|
ba7f71b367
|
Don't perform cluster 1-NN unless we have to.
|
2015-03-12 15:42:46 -04:00 |
|
Ryan Curtin
|
e650149355
|
Unmap intercluster distances (oops). Minor speedup.
|
2015-03-12 15:42:46 -04:00 |
|
Ryan Curtin
|
95cb008c6d
|
Start applying prune on intercluster distances. Not quite done yet.
|
2015-03-12 15:42:46 -04:00 |
|
Ryan Curtin
|
f440ca00db
|
Perform tree update at start of iteration. Cache some variables inside DTNNKMeans.
|
2015-03-12 15:42:46 -04:00 |
|
Ryan Curtin
|
928fd6dde0
|
Coalesce and decoalesce the tree.
|
2015-03-12 15:42:46 -04:00 |
|
Ryan Curtin
|
4ab12266cb
|
Avoid iterating over every point when pruned. Cache the amount the upper bounds and lower bounds must change when the node becomes unpruned.
|
2015-03-12 15:42:46 -04:00 |
|
Ryan Curtin
|
99b8d56dc1
|
Add static point prunes. Fairly significant runtime improvement.
|
2015-03-12 15:42:46 -04:00 |
|
Ryan Curtin
|
51e14ecf1a
|
Fix a bug. And LastUpperBound() doesn't work. The bugfix speeds thigns up, too.
|
2015-03-12 15:42:46 -04:00 |
|
Ryan Curtin
|
853b4bf6e6
|
Basic static pruning. Minor speedup.
|
2015-03-12 15:42:46 -04:00 |
|
Ryan Curtin
|
670a56a58f
|
Refactor to apply mappings earlier.
|
2015-03-12 15:42:46 -04:00 |
|
Ryan Curtin
|
2201a2f05d
|
Do mapping correctly; handle cover trees right.
|
2015-03-12 15:42:46 -04:00 |
|
Ryan Curtin
|
45a731f7b4
|
Make DTNNKMeans work again. Next up, tree coalescion. (Is that a word?)
|
2015-03-12 15:42:46 -04:00 |
|
Ryan Curtin
|
1d2edb9c20
|
Refactor DTNNKMeans according to the new algorithm. Lots of stuff torn out. It'll go back in when the time is right.
|
2015-03-12 15:42:46 -04:00 |
|
Ryan Curtin
|
06b279cace
|
Handle cover trees. They don't have two leaves. This still won't work *quite* right for coalescing/decoalescing though.
|
2015-03-12 15:42:46 -04:00 |
|
Ryan Curtin
|
905be1e614
|
Test with regular kd-trees and cover trees. The test conditions for the cover tree need to be adapted a little bit.
|
2015-03-12 15:42:46 -04:00 |
|
Ryan Curtin
|
540480ea66
|
Round four. Start over. This time, I proved that the algorithm is right before implementing it. This should help make debugging a lot easier.
|
2015-03-12 15:42:46 -04:00 |
|
Ryan Curtin
|
55c72afc77
|
Use default leaf size.
|
2015-03-12 15:42:45 -04:00 |
|
Ryan Curtin
|
595ae211e2
|
Try to keep the query and reference levels equal.
|
2015-03-12 15:42:45 -04:00 |
|
Ryan Curtin
|
3dc8249ce7
|
Use existing bounds, if we can.
|
2015-03-12 15:42:45 -04:00 |
|
Ryan Curtin
|
076fceb62d
|
Update reference to Github.
|
2015-03-12 15:42:45 -04:00 |
|
Ryan Curtin
|
70deac5abb
|
Allow autodetection of number of centroids.
|
2015-03-12 15:42:45 -04:00 |
|
Ryan Curtin
|
506c405bb8
|
Make the 'clustering' timer encompass everything. Including the tree building time.
|
2015-03-12 15:42:45 -04:00 |
|
Ryan Curtin
|
e2be4fb391
|
Compute max cluster distance after failed prune. This gives us another chance at a prune, and gives very minor speedup.
|
2015-03-12 15:42:45 -04:00 |
|
Ryan Curtin
|
e36e25f2d9
|
Coalesce the tree before kNN. Speedup! This is a fairly significant speedup, actually.
|
2015-03-12 15:42:45 -04:00 |
|
Ryan Curtin
|
820ba7490a
|
Refactoring, and tighten a bound for minor speedup.
|
2015-03-12 15:42:45 -04:00 |
|
Ryan Curtin
|
72f2ddd519
|
Refactoring to reduce runtime of tree update. It speeds things up in terms of distance computations too, a bit.
|
2015-03-12 15:42:45 -04:00 |
|
Ryan Curtin
|
b3c521ff48
|
Refactor: remove unnecessary temporary.
|
2015-03-12 15:42:45 -04:00 |
|
Ryan Curtin
|
d6d0d78b38
|
Use distances instead of upperBounds. Remove upperBounds entirely. Minor speed improvement (not 100% sure why).
|
2015-03-12 15:42:45 -04:00 |
|
Ryan Curtin
|
27c0096984
|
Use tighter bounds for distances. More speedup. Only increase the distances by the maximum amount those particular clusters could have moved.
|
2015-03-12 15:42:45 -04:00 |
|
Ryan Curtin
|
76e10e0463
|
Refactor to re-use distances to clusters. This is better than setting the distances to DBL_MAX every iteration, and provides reasonable speedup.
|
2015-03-12 15:42:45 -04:00 |
|
Ryan Curtin
|
acd8db891c
|
Refactor BaseCase() to apply mappings. This reduces memory usage.
|
2015-03-12 15:42:45 -04:00 |
|
Ryan Curtin
|
9ffe06de42
|
Force four-point leaves. This is generally faster than one point. More points are probably even better (to a point... hah) but that requires a large k.
|
2015-03-12 15:42:45 -04:00 |
|
Ryan Curtin
|
0968f5374f
|
Mark parent as pruned if its children are pruned.
|
2015-03-12 15:42:45 -04:00 |
|
Ryan Curtin
|
cc0aec0764
|
Prune a node when all its points are pruned.
|
2015-03-12 15:42:45 -04:00 |
|
Ryan Curtin
|
e4b3d87756
|
Recalculate upper bound before giving up on prune. This is done by Hamerly's algorithm and we obtain minor speedup as a result.
|
2015-03-12 15:42:45 -04:00 |
|
Ryan Curtin
|
d631986bf0
|
Refactor: do tree update before kNN search. This will allow us to make tighter prunes.
|
2015-03-12 15:42:45 -04:00 |
|
Ryan Curtin
|
cad47917ac
|
Prune parents when children are pruned.
|
2015-03-12 15:42:45 -04:00 |
|
Ryan Curtin
|
7aac685e68
|
No need to reset the bounds when un-pruning. They've been updated correctly all along, even when the node is pruned.
|
2015-03-12 15:42:45 -04:00 |
|
Ryan Curtin
|
a09c3e3314
|
Also use between-cluster-distance prune for points.
|
2015-03-12 15:42:45 -04:00 |
|