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 |
|
Ryan Curtin
|
a0a6bc1479
|
Perform prunes on individual points. Significant speedup with respect to number of calculations, no real speedup for runtime. But there is still time to optimize it.
|
2015-03-12 15:42:45 -04:00 |
|
Ryan Curtin
|
33ebcd5b2c
|
Cache mappings from new to old. Slows it down...? Not sure why there's a slowdown. Doesn't make much sense to me.
|
2015-03-12 15:42:45 -04:00 |
|
Ryan Curtin
|
2a3f6f1890
|
Apply another prune, but it isn't very effective. Maybe that's an artifact of the datasets I'm currently playing with.
|
2015-03-12 15:42:45 -04:00 |
|
Ryan Curtin
|
2453a81ca0
|
Run NNS on the centroids. No prune yet.
|
2015-03-12 15:42:45 -04:00 |
|
Ryan Curtin
|
0a71f31d2a
|
Better handling of cover trees.
|
2015-03-12 15:42:45 -04:00 |
|
Ryan Curtin
|
de0a5f1cf2
|
More reasonable handling of bound updating. This speeds things up.
|
2015-03-12 15:42:45 -04:00 |
|
Ryan Curtin
|
29a7f5f2df
|
Refactor UpdateTree() to sometimes Hamerly prune. We aren't properly retaining pruned nodes between iterations, but this is definitely a start and it's basically as fast as any of these attempted algorithms I've written.
|
2015-03-12 15:42:45 -04:00 |
|
Ryan Curtin
|
181942e08d
|
Revert back to one point per node.
|
2015-03-12 15:42:45 -04:00 |
|
Ryan Curtin
|
b068d3c021
|
Add a StatisticType for DTNN.
|
2015-03-12 15:42:45 -04:00 |
|
Ryan Curtin
|
4db93bfa4c
|
Refactor to use new set of rules. How many times will I restart writing this algorithm until I actually get it working well?
|
2015-03-12 15:42:45 -04:00 |
|
Ryan Curtin
|
bce6482563
|
Slightly tighter prune.
|
2015-03-12 15:42:45 -04:00 |
|
Ryan Curtin
|
aa36ea42dc
|
Shitty implementation of Elkan-type prune. It makes things faster... a little...
|
2015-03-12 15:42:45 -04:00 |
|
Ryan Curtin
|
cf56ad4a2a
|
A start at implementing pointwise Hamerly bounds.
|
2015-03-12 15:42:45 -04:00 |
|
Ryan Curtin
|
5a4b15cf0b
|
Remove vestigial code. After all, this code isn't generated by genetic algorithms. (Maybe it should be?)
|
2015-03-12 15:42:45 -04:00 |
|
Ryan Curtin
|
6300189ab4
|
Correct Pelleg-Moore prunes that finish a node. There were cases where a Pelleg-Moore prune would happen before committing the point. This is actually getting pretty fast in terms of base cases, so I am happy with that (for once).
|
2015-03-12 15:42:44 -04:00 |
|
Ryan Curtin
|
b094362c2b
|
Add some debugging output. This makes it a bit easier to figure out what is going wrong.
|
2015-03-12 15:42:44 -04:00 |
|
Ryan Curtin
|
c413ad2399
|
Better speedups, provide more output on prunes.
|
2015-03-12 15:42:44 -04:00 |
|
Ryan Curtin
|
50d4a325c7
|
Remove debug output; implement Pelleg-Moore prune. Now this is faster than the regular dtkm branch. Sometimes starting over is a good thing.
|
2015-03-12 15:42:44 -04:00 |
|
Ryan Curtin
|
2633583a44
|
Refactor into UpdateOwner(), instead of an ugly loop at the beginning of TreeUpdate().
|
2015-03-12 15:42:44 -04:00 |
|
Ryan Curtin
|
de01b8f67a
|
I don't think this is worth saving. It also doesn't work very well, but I learned a lot about the bookkeeping I need to do.
|
2015-03-12 15:42:44 -04:00 |
|
Ryan Curtin
|
ca7b1a38ff
|
Last changes for a little while.
|
2015-03-12 15:42:44 -04:00 |
|
Ryan Curtin
|
a06391e861
|
Fix second bound to not be the first bound. In some situations, MinQueryNodeDistance() was equal to SecondClosestBound(). This fixes that. This also resolves an issue where SecondClosestBound() wasn't properly updated after an Elkan prune.
|
2015-03-12 15:42:44 -04:00 |
|
Ryan Curtin
|
ca4066a3a8
|
Don't set CQN to NULL before recursing. This was an error in TreeUpdate() that caused... some problems that I'm only vaguely aware of as problems. Also refactor one of the second bound rules and comment it so that it makes some semblance of sense.
|
2015-03-12 15:42:44 -04:00 |
|
Ryan Curtin
|
87ea896277
|
Remove some debug output we don't need anymore.
|
2015-03-12 15:42:44 -04:00 |
|
Ryan Curtin
|
b6a1c3699e
|
Unset Owner() after failed Hamerly prune. This is better than setting it by hand when we're checking if we can prune.
|
2015-03-12 15:42:44 -04:00 |
|
Ryan Curtin
|
29136848ae
|
Fix compilation warnings. secondClosest will eventually be removed but is commented for now.
|
2015-03-12 15:42:44 -04:00 |
|
Ryan Curtin
|
27f3a36e93
|
Count number of points that are Hamerly pruned.
|
2015-03-12 15:42:44 -04:00 |
|
Ryan Curtin
|
eba305d23f
|
Comment out most of the debugging output. It still shows you what's been Hamerly pruned and what hasn't, which is what's important right now.
|
2015-03-12 15:42:44 -04:00 |
|
Ryan Curtin
|
79379ee09e
|
Um, I made it faster. We're well into the land of confusion. Confusion will reign until eventual refactoring. Hamerly prunes still don't appear to be working properly after a couple iterations.
|
2015-03-12 15:42:44 -04:00 |
|
Ryan Curtin
|
994b4858ba
|
Remove unnecessary check for parent's SCB. There actually isn't a need to take the parent's second closest bound preferentially, and it was preventing some valid prunes. This gives a little more (but not enough) Hamerly pruning, and provides (as usual) trivial speedup---but more than none!
|
2015-03-12 15:42:44 -04:00 |
|
Ryan Curtin
|
abfc0b8e4d
|
Be more careful about when to take the last SCB. This gives a trivial speedup, but hey, speedup! Hamerly prunes are still not working properly, but I'm getting there.
|
2015-03-12 15:42:44 -04:00 |
|
Ryan Curtin
|
db0d792ef8
|
Handle SecondClosestBound() a little better. Debugging information is still there, and it is going to need to be seriously refactored. We still don't have properly working Hamerly prunes; they go away after a couple iterations incorrectly.
|
2015-03-12 15:42:44 -04:00 |
|
Ryan Curtin
|
772dc745c4
|
Add debug output; don't adjust second bound. This provides another minor speedup, but this still is nowhere near as fast as it should be with a properly working Hamerly prune.
|
2015-03-12 15:42:44 -04:00 |
|
Ryan Curtin
|
c83b94bc22
|
A first attempt at a working Hamerly prune. The bounds tighten too much and don't reset, so there's not much speedup, but it's a start.
|
2015-03-12 15:42:44 -04:00 |
|
Ryan Curtin
|
727714ea11
|
Avoid uninitialized owner field.
|
2015-03-12 15:42:44 -04:00 |
|
Ryan Curtin
|
96bcad550d
|
Fix invalid memory access.
|
2015-03-12 15:42:44 -04:00 |
|
Ryan Curtin
|
83f4201766
|
Add second bound.
|
2015-03-12 15:42:44 -04:00 |
|
Ryan Curtin
|
cd1765c30f
|
Rename to Hamerly-type score. Because that's what it is. Although Elkan's algorithm has a type of score that's sort of like this, it's Hamerly's algorithm that only keeps track of the second-closest cluster distance, and that's what we're doing here.
|
2015-03-12 15:42:44 -04:00 |
|
Ryan Curtin
|
6ad3f73535
|
Oops, bad parameter name.
|
2015-03-12 15:42:44 -04:00 |
|
Ryan Curtin
|
9515f01939
|
New stub method for (hopefully) good Elkan prune. This allows us to prune without even needing to recurse.
|
2015-03-12 15:42:44 -04:00 |
|
Ryan Curtin
|
f8a73a38ae
|
Elkan pruning can't prune the best query node. Bugfix. Trivial slowdown.
|
2015-03-12 15:42:44 -04:00 |
|
Ryan Curtin
|
dea4b29b71
|
Update FirstBound correctly. Trivial speedup.
|
2015-03-12 15:42:44 -04:00 |
|
Ryan Curtin
|
ee7eb43f01
|
Set FirstBound() after the allknn. Now, checking if FirstBound() == DBL_MAX is unnecessary, although this doesn't (yet) seem to give any additional prunes.
|
2015-03-12 15:42:44 -04:00 |
|