Giter Club home page Giter Club logo

bayesian_tree's Introduction

A Bayesian Decision Tree Algorithm

This is an implementation of the paper: A Bayesian Decision Tree Algorithm by Nuti et al.

Feature Support

This package implements:

  • Classification (binary and multiclass)
  • Regression
  • Both models are available in two versions respectively:
    • Perpendicular Trees: The classic decision/regression tree structure with splits along a single feature dimension (i.e., perpendicular to a feature dimension axis), analogous to e.g. the scikit-learn decision and regression trees.

      The models are called PerpendicularClassificationTree and PerpendicularRegressionTree.

    • Hyperplane Trees: Decision/regression trees using arbitrarily-oriented hyperplanes. These models are more flexible than perpendicular trees as they cover a much larger search space to naturally make use of correlations between features.

      All else equal, hyperplane trees typically lead to shallower trees with fewer leaf nodes compared to their perpendicular counterparts because they can employ more than just a single feature dimension per split. This can lead to less overfitting and better generalization performance, but no such guarantees exist because hyperplane trees are still being constructed in a greedy manner.

      Note that hyperplane trees take much longer to train and need to be trained stochastically using global optimizers due to the exponentially large search space.

      The models are called HyperplaneClassificationTree and HyperplaneRegressionTree.

Installation

To install you can either use conda or pip:

Conda

git clone https://github.com/UBS-IB/bayesian_tree
cd bayesian_tree
conda build conda.recipe
conda install --use-local bayesian_decision_tree

PIP

git clone https://github.com/UBS-IB/bayesian_tree
cd bayesian_tree
pip install -e .

Usage

We include some examples for various uses in the examples directory. The models are fully compatible with scikit-learn, so you can use them for e.g. cross-validation or performance evaluation using scikit-learn functions.

TODO

  • Add parallelization option (dask)

bayesian_tree's People

Contributors

kasparthommen avatar lluisantonijimenez avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.