m5py
¶
scikit-learn
-compliant M5 / M5' model trees for python
In 1996 R. Quinlan introduced the M5 algorithm, a regression tree algorithm similar to CART (Breiman), with additional pruning so that leaves may contain linear models instead of constant values. The idea was to get smoother and simpler models.
The algorithm was later enhanced by Wang & Witten under the name M5 Prime (aka M5', or M5P), with an implementation in the Weka toolbox.
m5py
is a python implementation leveraging scikit-learn
's regression tree engine.
Citing¶
If m5py
helps you with your research work, don't hesitate to spread the word ! For this
please cite this conference presentation.
Optionally in addition you can also cite this Zenodo entry
. Thanks!
Installing¶
> pip install m5py
Usage¶
See the usage examples gallery.
Main features / benefits¶
- The classic
M5
algorithm in python, compliant withscikit-learn
.
See Also¶
- Weka's M5P model
- LightGBM's linear_tree
- linear-tree that has a similar procedure than lightgbm's (from discussion)
Others¶
Do you like this library ? You might also like my other python libraries
Want to contribute ?¶
Details on the github page: https://github.com/smarie/python-m5p