Skip to main content

A fast and frugal tree classifier for sklearn

Project description

fasttrees

A fast-and-frugal-tree classifier based on Python's scikit learn.

Fast-and-frugal trees are classification trees that are especially useful for making decisions under uncertainty. Due their simplicity and transparency they are very robust against noise and errors in data. They are one of the heuristics proposed by Gerd Gigerenzer in Fast and Frugal Heuristics in Medical Decision. This particular implementation is based on on the R package FFTrees, developed by Phillips, Neth, Woike and Grassmaier.

Install

You can install fasttrees using

pip install fasttrees

Usage

Instantiate a fast-and-frugal tree classifier:

fc = FastFrugalTreeClassifier()

Fit on your data:

fc.fit(X_train, y_train)

View the fitted tree (this is especially useful if the 'predictions' will be carried out by humans in practice):

fc.get_tree()

Predict:

preds = fc.predict(X_test)

Score:

fc.score(X_test, y_test)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for fasttrees, version 1.2.2
Filename, size File type Python version Upload date Hashes
Filename, size fasttrees-1.2.2.tar.gz (5.0 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page