SkillAgentSearch skills...

Pines

A Python implementation of decision trees, compatible with sklearn.

Install / Use

/learn @dmitru/Pines
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

Pines: a Decision Trees ML library

A Python library that implements sklearn-compatible decision trees.

Check the examples directory to see how to use the package for both classification and regression problems.

List of things implemented

  • CART algorithm for building regression and classification trees
  • Oblivious Trees
  • Different splitting criteria: Gini index, entropy

Rationale

Wait... Why would anyone want to implement his own DT package from scratch, while there's such thing as slklearn? That's some of the reasons:

  • To better understand DTs and how they are constructed - there's no better way to understand something than to implement it;
  • To have more freedom in trying different approaches in DTs construction (e.g. oblivious trees, etc). With the trees from sklearn one would have to code it in Cython, which is nasty.

Limitations & roadmap

  • Implement tree pruning
  • Add more parameters to tweak, make the interface more like sklearn.tree.DecisionTree* classes
  • Speed things up, maybe switch to Cython?
View on GitHub
GitHub Stars12
CategoryDevelopment
Updated3y ago
Forks1

Languages

Python

Security Score

75/100

Audited on Sep 22, 2022

No findings