"ARF" = Auton Random Forest, the C library
arfreader.py : Converts an ARF file to an sklearn RF. Only classifiers are implemented right now. Adapated from Nick's code
arfsk.py : Wraps an sklearn RF instance to provide the metrics in the C library: inbounds, dot product sum, mean entropy, feature usages
Contact Dan Howarth with any questions
Consider a forest with N trees. There are
import arfsk
wrapper = arfsk.AutonSKRFWrapper(rf) # rf is the sklearn random forest
wrapper.write_legacy("desired/output/filename.txt", ignore_inbounds=True)
If you want to include the inbounds information in a way that matches AutonRF you have to first use the train data to set the bounds.
import arfsk
wrapper = arfsk.AutonSKRFWrapper(rf) # rf is the sklearn random forest
wrapper.set_bounds_data(train_data)
wrapper.write_legacy("desired/output/filename.txt", ignore_inbounds=False)