All Projects → AndriyMulyar → sklearn-oblique-tree

AndriyMulyar / sklearn-oblique-tree

Licence: GPL-3.0 license
a python interface to OC1 and other oblique decision tree implementations

Programming Languages

c
50402 projects - #5 most used programming language
python
139335 projects - #7 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to sklearn-oblique-tree

Algorithmic-Trading
Algorithmic trading using machine learning.
Stars: ✭ 102 (+209.09%)
Mutual labels:  scikit-learn, decision-tree
kdd99-scikit
Solutions to kdd99 dataset with Decision tree and Neural network by scikit-learn
Stars: ✭ 50 (+51.52%)
Mutual labels:  scikit-learn, decision-tree
machine learning
A gentle introduction to machine learning: data handling, linear regression, naive bayes, clustering
Stars: ✭ 22 (-33.33%)
Mutual labels:  scikit-learn
machine learning examples
machine_learning_examples
Stars: ✭ 68 (+106.06%)
Mutual labels:  scikit-learn
introduction to ml with python
도서 "[개정판] 파이썬 라이브러리를 활용한 머신 러닝"의 주피터 노트북과 코드입니다.
Stars: ✭ 211 (+539.39%)
Mutual labels:  scikit-learn
datascienv
datascienv is package that helps you to setup your environment in single line of code with all dependency and it is also include pyforest that provide single line of import all required ml libraries
Stars: ✭ 53 (+60.61%)
Mutual labels:  scikit-learn
scikit-learn.net
Machine Learning in .NET Core.
Stars: ✭ 32 (-3.03%)
Mutual labels:  scikit-learn
handson-ml
도서 "핸즈온 머신러닝"의 예제와 연습문제를 담은 주피터 노트북입니다.
Stars: ✭ 285 (+763.64%)
Mutual labels:  scikit-learn
How-to-score-0.8134-in-Titanic-Kaggle-Challenge
Solution of the Titanic Kaggle competition
Stars: ✭ 114 (+245.45%)
Mutual labels:  scikit-learn
Data-Mining-and-Warehousing
Data Mining algorithms for IDMW632C course at IIIT Allahabad, 6th semester
Stars: ✭ 19 (-42.42%)
Mutual labels:  decision-tree
regression-stock-prediction
Predicting Google’s stock price using regression
Stars: ✭ 54 (+63.64%)
Mutual labels:  scikit-learn
topometry
A comprehensive dimensional reduction framework to recover the latent topology from high-dimensional data.
Stars: ✭ 64 (+93.94%)
Mutual labels:  scikit-learn
Deploy-machine-learning-model
Dockerize and deploy machine learning model as REST API using Flask
Stars: ✭ 61 (+84.85%)
Mutual labels:  scikit-learn
jupyter-notebooks
Jupyter Notebooks and miscellaneous
Stars: ✭ 51 (+54.55%)
Mutual labels:  decision-tree
MachineLearning
Implementations of machine learning algorithm by Python 3
Stars: ✭ 16 (-51.52%)
Mutual labels:  scikit-learn
PyRCN
A Python 3 framework for Reservoir Computing with a scikit-learn-compatible API.
Stars: ✭ 39 (+18.18%)
Mutual labels:  scikit-learn
kmeans-dbscan-tutorial
A clustering tutorial with scikit-learn for beginners.
Stars: ✭ 20 (-39.39%)
Mutual labels:  scikit-learn
nba-analysis
Using machine learning libraries to analyze NBA data
Stars: ✭ 14 (-57.58%)
Mutual labels:  scikit-learn
nyc-2018-scikit-sprint
NYC scikit-learn sprint (Sep 2018)
Stars: ✭ 16 (-51.52%)
Mutual labels:  scikit-learn
ML-For-Beginners
12 weeks, 26 lessons, 52 quizzes, classic Machine Learning for all
Stars: ✭ 40,023 (+121181.82%)
Mutual labels:  scikit-learn

🌳 Oblique Decision Trees in Python

A python interface to oblique decision tree implementations:

Installation (Python 3)

First install numpy with:

pip install numpy

then run:

pip install git+https://github.com/AndriyMulyar/sklearn-oblique-tree

Use

Trees can be induced with the normal scikit-learn classifier api. For instance:

from sklearn.datasets import load_iris, load_breast_cancer
from sklearn.model_selection import train_test_split
from sklearn.metrics import accuracy_score
from sklearn_oblique_tree.oblique import ObliqueTree

random_state = 2

#see Murthy, et all for details.
#For oblique with consideration of axis parallel
#tree = ObliqueTree(splitter="oc1, axis_parallel", number_of_restarts=20, max_perturbations=5, random_state=random_state)
#
#For multivariate CART select 'cart' splitter
#tree = ObliqueTree(splitter="cart", number_of_restarts=20, max_perturbations=5, random_state=random_state)

#consider only oblique splits
tree = ObliqueTree(splitter="oc1", number_of_restarts=20, max_perturbations=5, random_state=random_state)

X_train, X_test, y_train, y_test = train_test_split(*load_iris(return_X_y=True), test_size=.4, random_state=random_state)

tree.fit(X_train, y_train)

predictions = tree.predict(X_test)


print("Iris Accuracy:",accuracy_score(y_test, predictions))

Acknowledgements

VCU Imbalanced Learning and Data Stream Mining Laboratory alt text

Original (unmodified) OC1 Source Code

https://github.com/AndriyMulyar/sklearn-oblique-tree/tree/412d502c04d66046388e469a329d8bcf195bf34b/oc1_implementation

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].