Skip to content

Latest commit

 

History

History
26 lines (20 loc) · 1.07 KB

README.md

File metadata and controls

26 lines (20 loc) · 1.07 KB

Classifier

Decision Tree and Random Forest

There is minimalistic implementation of Decision Tree and Random Forest on C++ which can be also used as python module

  • All the implementation of the tree in src/decision_tree_classifier.*
  • The random forest wrapper implementation in src/random_forest_classifier.*
  • The src/py_module.cpp is necessary for building a python module from it using boost::python
  • There are some tests in main.cpp, which can be ran by uncommenting add_executable in CMakeLists.txt
  • Dynamic library module/decision_tree.so acts like a python module, so, for example, being in the same folder with it, you can import it using
import decision_tree as tree

or

from decision_tree import decision_tree_classifier, random_forest_classifier

etc.

  • I plan to add some numpy support

  • You can look at the examples in corresponding folder. Here's one:

  • With much noise this decision_tree used to retrain, so it would be good to add some "regularizers". But I'm too lazy :P