Gijs 93b14bba40 | 3 years ago | |
---|---|---|
commenting_code_model | 3 years ago | |
.gitignore | 3 years ago | |
README.md | 3 years ago |
README.md
Random_forest
Exploring random forest algorithm during residency Meise.
In this repository experiments with the random forest algorithm: a commented implementation to develop an understanding of its workings and a visualizer of the generated models.
The implementation was taken from Machine Learning Mastery
Files
The repository has an annotated version of the algorithm, a dataset with trainingdata and a visualizer.
commenting_code_model/random_forest_model_altered.py an implementation of the Random Forest model. Commented during Anaïs Bercks' residency in Meise, and slighty altered to store the generated model into a json file.
commenting_code_model/iris_data.csv data set on Iris petals
commenting_code_model/visualizer/visualizer.py the script visualizing a model generated by the random_forest_model_altered.py script.
Running
Run the script commenting_code_model/random_forest_model_altered.py to generate random forests. The generated models will be json files in the same directory as the model.
Optionally run the commenting_code_model/visualizer/visualizer.py to generate visualizations. Those visualizations will the placed in the visualizer folder.
Requirements
The implementations are written in python and require python 3, find information on how to install python here
The visualizer uses graphviz to generate the visualization. Find information on how to install graphviz here
The visualizer also requires the graphviz python bindings. The easiest way to install them is through pip:
pip3 install graphviz