Skip to content

m5py

scikit-learn-compliant M5 / M5' model trees for python

Python versions Build Status Tests Status Coverage Status codecov Flake8 Status

Documentation PyPI Downloads Downloads per week GitHub starsDOI

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 DOI. Thanks!

Installing

> pip install m5py

Usage

See the usage examples gallery.

Main features / benefits

  • The classic M5 algorithm in python, compliant with scikit-learn.

See Also

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