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.