Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spill trees #747

Merged
merged 84 commits into from Aug 18, 2016
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
84 commits
Select commit Hold shift + click to select a range
8adae19
Add Spill Trees, based on binary space trees.
MarcosPividori Jul 4, 2016
634e271
Fix details.
MarcosPividori Jul 6, 2016
8b2dc10
Improve expansion of node's bound. Do not include the overlapping buf…
MarcosPividori Jul 7, 2016
7aaf969
Fix simple errors.
MarcosPividori Jul 8, 2016
8d5994c
Add support for Hybrid SP-Tree Search (Single tree traverser).
MarcosPividori Jul 12, 2016
2e67697
Add support for spill trees in knn search.
MarcosPividori Jul 12, 2016
c23f0b5
Syntax details.
MarcosPividori Jul 13, 2016
91334cb
Fix error in the order of parameters.
MarcosPividori Jul 13, 2016
061ee92
Add tests for spill tree.
MarcosPividori Jul 16, 2016
7bd4416
Add approximate knn search tests for hybrid spill trees.
MarcosPividori Jul 16, 2016
946eddf
Add exact knn search tests for hybrid spill trees.
MarcosPividori Jul 16, 2016
c9f6cd3
Include missing headers.
MarcosPividori Jul 16, 2016
e33a112
Use a simple tree traverser for spill tree (Remove defeatist seach in…
MarcosPividori Jul 18, 2016
e1c01ca
Implement defeatist search in the Rescore() method, with a specializa…
MarcosPividori Jul 18, 2016
723bec5
Remove unnecessary BoundType template parameter.
MarcosPividori Jul 27, 2016
2af816a
Record splitDimension and splitValue.
MarcosPividori Jul 27, 2016
5266096
Set Overlapping node when percentage greater than rho but not because of
MarcosPividori Jul 27, 2016
a599bf8
Add NeighborSearchRules specialization for Spill Trees.
MarcosPividori Jul 27, 2016
b4d5a1d
Add dual tree traverser for Spill Trees.
MarcosPividori Jul 27, 2016
9551cc6
Set non-overlapping for spill query tree.
MarcosPividori Jul 27, 2016
9c1ef2a
Avoid calculating bounds when oldScore is the best possible.
MarcosPividori Jul 27, 2016
498e74d
Remove unnecessary copying of dataset in SpillTrees.
MarcosPividori Jul 28, 2016
e95e3b4
Create a new class SpillSearch that encapsulates an instance of Neigh…
MarcosPividori Jul 28, 2016
0120357
Update NSModel to use SpillSearch class.
MarcosPividori Jul 28, 2016
5d68382
Log Num of BaseCases/Score.
MarcosPividori Jul 29, 2016
bff4eca
Add more tests for SpillSearch
MarcosPividori Jul 29, 2016
c86b32c
Update documentation.
MarcosPividori Aug 1, 2016
ce34be6
Remove B_2 bound for neighbor search with spill trees.
MarcosPividori Aug 1, 2016
ea37f0d
Change spill rules's filename.
MarcosPividori Aug 1, 2016
f778e8e
Fix SpillTree's move constructor
MarcosPividori Aug 1, 2016
a4ac0b2
Include overlapping points in each child's bounding box.
MarcosPividori Aug 1, 2016
9588a6d
Generalize Spill Trees, to consider general splitting hyperplanes, no…
MarcosPividori Aug 4, 2016
4a66098
Remove unnecessary code.
MarcosPividori Aug 4, 2016
b9e23d4
Update SpillSearch to the general definition of Spill Trees.
MarcosPividori Aug 4, 2016
a71b57c
Fix serialization.
MarcosPividori Aug 4, 2016
54614ba
Update documentation.
MarcosPividori Aug 5, 2016
388941a
Use arma::Col instead of std::vector. Also, avoid resizing in SplitPo…
MarcosPividori Aug 6, 2016
72274e7
Properly consider all points to the left when hyperplane was not init…
MarcosPividori Aug 6, 2016
fdc8e9c
Avoid calculating the score of both child nodes when not necessary, w…
MarcosPividori Aug 8, 2016
8f32156
Split implementation of different split methods in separated files, a…
MarcosPividori Aug 8, 2016
02d4a6d
Add a new test to check the splitting of points in Spill Trees.
MarcosPividori Aug 10, 2016
e81731d
Always normalise a projection vector.
MarcosPividori Aug 11, 2016
17d2c2f
Add Tests for Hyperplane class.
MarcosPividori Aug 11, 2016
d8b16a0
Fix file order.
MarcosPividori Aug 11, 2016
3b15fdf
Add new element to TreeTraits, to know if NumDescendants() includes d…
MarcosPividori Aug 11, 2016
fa81be4
Add rho and leafSize members on SpillSearch, and a command line param…
MarcosPividori Aug 11, 2016
9a8a9eb
Add command line parameter to calculate the effective error.
MarcosPividori Aug 11, 2016
f33a19d
Shouldn't modify parameters of trained model.
MarcosPividori Aug 11, 2016
d22e65a
Merge branch 'master' into spill-trees
MarcosPividori Aug 11, 2016
69804c6
Properly count the number of cases when calculating the effective err…
MarcosPividori Aug 11, 2016
180fc11
Merge branch 'master' into spill-trees
MarcosPividori Aug 16, 2016
c42e40b
This should make appVeyor succeed.
MarcosPividori Aug 16, 2016
7e5e054
Remove old include.
MarcosPividori Aug 16, 2016
d3ab34a
Add compiler option for MSVC.
MarcosPividori Aug 16, 2016
e06cfc8
Many syntax details.
MarcosPividori Aug 16, 2016
722d211
Fix comment.
MarcosPividori Aug 16, 2016
89725f4
Syntax details.
MarcosPividori Aug 16, 2016
0757955
Use linspace to fill a Col vector.
MarcosPividori Aug 16, 2016
dce67ec
Simplify the code.
MarcosPividori Aug 16, 2016
9215515
Add EffectiveError() to NeighborSearch class, and a proper command li…
MarcosPividori Aug 16, 2016
3e79d27
Add Recall() to NeighborSearch class, and a proper command line optio…
MarcosPividori Aug 16, 2016
99de521
Emphasize command line comments.
MarcosPividori Aug 16, 2016
ac5f836
Simple syntax detail.
MarcosPividori Aug 16, 2016
207c1d4
Split test in 2 tests.
MarcosPividori Aug 16, 2016
471bb24
Simplify knn test.
MarcosPividori Aug 16, 2016
f1253d3
Add tests for Move and Copy constructors of SpilTrees.
MarcosPividori Aug 17, 2016
f989164
Details in spilltree and knn tests.
MarcosPividori Aug 17, 2016
02fb618
Split line.
MarcosPividori Aug 17, 2016
0267acb
Properly define the Tree Traversers for Spill trees.
MarcosPividori Aug 17, 2016
70fbeab
Add a new template parameter to NeighborSearch class, to set a specif…
MarcosPividori Aug 17, 2016
b334674
Set defeatist traverser for spill search class.
MarcosPividori Aug 17, 2016
e4ce9be
Remove specialization of NeighborSearchRules for SpillTrees.
MarcosPividori Aug 17, 2016
2bad753
Avoid B_2 bound for Spill Trees.
MarcosPividori Aug 17, 2016
b55534d
Properly consider ElemType parameter for bounds.
MarcosPividori Aug 17, 2016
2698225
Improve reverse compatibility of NSModel.
MarcosPividori Aug 17, 2016
e4cf1fd
Avoid calculating the bounds when oldScore is the best possible.
MarcosPividori Aug 17, 2016
ecaf1bf
Properly update search model.
MarcosPividori Aug 17, 2016
c5fe485
Add Warning when true_neighbors_file and true_distances_file are prov…
MarcosPividori Aug 17, 2016
5795c74
Remove SpillSearch class. Use NeighborSearch class and typedefs for d…
MarcosPividori Aug 18, 2016
ae84513
Update template name.
MarcosPividori Aug 18, 2016
b1530ea
Update tests to consider SpillKNN.
MarcosPividori Aug 18, 2016
da35f94
Remove outdated information.
MarcosPividori Aug 18, 2016
8a5ec21
Doesn't copy the dataset in the copy constructor when it is not neces…
MarcosPividori Aug 18, 2016
815391b
Fix Copy constructor. Properly set pointer to dataset.
MarcosPividori Aug 18, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
23 changes: 2 additions & 21 deletions src/mlpack/tests/knn_test.cpp
Expand Up @@ -918,17 +918,7 @@ BOOST_AUTO_TEST_CASE(HybridSpillSearchTest)

for (size_t mode = 0; mode < 2; mode++)
{
switch (mode)
{
case 0: // Single Tree Search.
spTreeSearch.Naive() = false;
spTreeSearch.SingleMode() = true;
break;
case 1: // Dual Tree Search.
spTreeSearch.Naive() = false;
spTreeSearch.SingleMode() = false;
break;
}
spTreeSearch.SingleMode() = (mode == 0);

arma::Mat<size_t> neighborsSPTree;
arma::mat distancesSPTree;
Expand All @@ -952,19 +942,10 @@ BOOST_AUTO_TEST_CASE(DuplicatedSpillSearchTest)
dataset.randu(50, 300); // 50 dimensional, 300 points.

const size_t k = 15;
double tau = 0;

for (size_t test = 0; test < 2; test++)
{
switch (test)
{
case 0:
tau = 0;
break;
case 1:
tau = 0.1;
break;
}
double tau = test * 0.1;

SpillSearch<> spTreeSearch(dataset, false, false, tau);
arma::Mat<size_t> neighborsSPTree;
Expand Down
14 changes: 1 addition & 13 deletions src/mlpack/tests/spill_tree_test.cpp
Expand Up @@ -116,19 +116,7 @@ void SpillTreeHyperplaneTestAux()

for (size_t cases = 0; cases < 3; cases++)
{
double tau;
switch (cases)
{
case 0:
tau = 0;
break;
case 1:
tau = 0.05;
break;
case 2:
tau = 0.1;
break;
}
double tau = cases * 0.05;

// Let's check node by node, that points in the left child are considered to
// the left by the splitting hyperplane, and the same for points in the
Expand Down