kLabUM / rrcf

🌲 Implementation of the Robust Random Cut Forest algorithm for anomaly detection on streams
https://klabum.github.io/rrcf/
MIT License
488 stars 111 forks source link

All trees contain same points. #60

Closed xphter closed 4 years ago

xphter commented 4 years ago

I have a question. The new point in stream will be inserted into each trees, so all trees will contain the same points in future. Is it correct?

mdbartos commented 4 years ago

If you are inserting the point into every tree, then yes, all trees will contain the point until it is dropped.

You can verify this using RCTree.find_duplicate

Note that it is not strictly necessary to insert the point into every tree.

xphter commented 4 years ago

Thank you first. Another question ^_^, so the new point should be inserted into a tree randomly, correct?

mdbartos commented 4 years ago

Yes, the position of the point in the tree will be random--specifically, it is determined by the insertpoint algorithm shown here: https://klabum.github.io/rrcf/insert-and-delete.html