randomforest algorithm numpy and cpp primitive
work in progress - pushed into phylanx upstream/master for review and commentary.
~the phylanx primitive needs more argument checking, the primitive implementation needs to be cleaned up (it's borrowed code from lra), and testing work...among other things (the phylanx cpp code formatting linter will break on this cpp code)!~ where should cpp unit test code go? @justwagle @scheherzade
will need to add support for the following capabilities
- [x] implement training/prediction for randomforest
- [x] implement model store/load into/from phylanx::ir::dictionary
- [x] implement 'randomforest_fit' and 'randomforest_predict' functions in primitive
- [x] implement c++ unit test
- [x] implement python numpy unit test
- [ ] implement python phylanx unit test
where should cpp unit test code go?
@ct-clmsn what about adding it here: https://github.com/STEllAR-GROUP/phylanx/tree/master/tests/unit/algorithm?
will try to modify the implementation to use primitive types.
@hkaiser think the issue storing trained randomforest models is resolved. Two primitives have been added into this plugin, one to 'fit' (train) a model and another to do prediction. Trained models are converted into a tree composed of phylanx::ir::dictionary instances after training. The trained phylanx::ir::dictionary tree is the first parameter in the prediction function.