You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1.6 KiB

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.

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