[mlpack-git] [mlpack/mlpack] Resetting stats in NeighborSearch. (#672)

MarcosPividori notifications at github.com
Fri Jun 3 10:23:55 EDT 2016


The problem is that the query tree is provided as an argument every time Search(Tree* queryTree, ...) method is called, so we can not track when it is necessary to reset the stats there. We don't know where that query tree comes from... if it is a new one, or was previously used for something different...

This is what I understand, let me know if you agree:

- The problem appears when we use the same query tree with different reference sets. I mean, when reusing outdated stats in a different scenario.

- When we do monochromatic search, the reference set and query set are always the same, so we never reach the erroneous situation. So, treeNeedsReset, as used now, is irrelevant. I mean, NeighborSearch class reset the stats in the reference tree every time we repeat a monochromatic search. It is not necessary, because the reference set never changes. If it changes, a new tree is built, with new stats, so there isn't any problem.

- On the other hand, we should reset stats when using the same query tree with different reference datasets. But we don't know that information, because the query tree is not part of the state of NeighborSearch class. It is provided as an argument every time Search(Tree* queryTree, ...) method is called, so we can not track when it is necessary to reset the stats there. We don't know where that query tree comes from... if it is a new one, or was previously used for something different...

Because of that, I think we should take one of the approaches:
+ allways reset the provided query tree. This way we are sure everything is ok, but slows down the calculation a bit.
+ never reset, and add a comment mentioned this, so the user can decide if it is necessary.

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/mlpack/mlpack/issues/672#issuecomment-223592697
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160603/5834659b/attachment-0001.html>


More information about the mlpack-git mailing list