TreeSurgeon contains routines to visualise Random Forest Regressor models. The module takes models output files made by sklearn's RandomForestRegressor implementation of the random forest regressor algorithm. The raw output files from sklearn models (*pkl) first needs to be converted to the input .csv files required by TreeSurgeon using the
extract_models4TreeSurgeon.py script in the
sparse2spatial module.
- Process the saved Random Forest Regressor models
*.pklfiles into the.csvthat TreeSurgeon* expects using the script insparse2spatialmodule. You will need to update some lines in the script as described there.
python extract_models4TreeSurgeon.py
- Place files in the
csvfolder.
for composite files:
python start.py $NCPUS
or for single dot files
python start.py $NCPUS 1
- This then runs in the background (no screen). To change edit
showoption in main.js
The colours are set in the colours.json file.
This is in the pdfs folder.
conda install nodejs
npm install
sudo npm install -g --save electron --unsafe-perm=true --allow-root
- for merge imagemagick and ghostscript need to be installed
python montage.py
This package was initially written for use with the sparse2spatial package for work to predict sea-surface concentrations [Sherwen et al. 2019]. However it can be used for any Radom Forest Regressor models made by sklearn and post-processed to TreeSurgeon input by sparse2spatial
Sherwen, T., Chance, R. J., Tinel, L., Ellis, D., Evans, M. J., and Carpenter, L. J.: A machine learning based global sea-surface iodide distribution, Earth Syst. Sci. Data Discuss., https://doi.org/10.5194/essd-2019-40, in review, 2019.
Copyright (c) 2019 Daniel Ellis and Tomas Sherwen
This work is licensed under a permissive MIT License.
