No project description provided
Project description
pyrus-decision-tree
Decision Tree written in Rust, with Python bindings
Extremely slow Decision Tree written in Rust
Have you found yourself yerning for a slower version of Scikit-Learn's
DecisionTreeClassifier
with less features?
You've come to the right place.
This was a weekend project and I've botched the implementation somewhere, probably in the splitter logic for tree nodes, so while it's written entirely in Rust and requires no dependencies; it manages to do a lot of inefficient logic, very quickly.
On a handful of testing data, with equivelent parameters, it yields the same results, only much, much slower.
This is currently the first release and the tree only implements
the scikit-learn
API's fit(X, y)
and predict(X)
methods as of now,
and only as a classifier (no regression tree yet)
Maybe I'll get back to fixing it, maybe not.
Install:
pip install --upgrade pyrus-decision-tree
Uninstall:
pip uninstall pyrus-decision-tree
Use:
from pyrus_decision_tree import PyrusDecisionTree dataset = [[2.771244718, 1.7847839292], [1.728571309, 1.1697614132], [3.678319846, 2.812813571], [3.961043357, 2.619950321], [2.999208922, 2.209014212], [7.497545867, 3.162953546], [9.00220326, 3.339047188], [7.444542326, 0.476683375], [10.12493903, 3.234550982], [6.642287351, 3.319983761]] targets = [0, 0, 0, 0, 0, 1, 1, 1, 1, 1] clf = PyrusDecisionTree(5) clf.fit(dataset, targets) predictions = clf.predict(dataset)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Built Distributions
Hashes for pyrus_decision_tree-0.1.1-cp37-cp37m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6a74913d3b04e02add68d5585508b112606668387741884a94981ae552b7e43a |
|
MD5 | 4ae2688d2cede4d5959bb2d50d3427f1 |
|
BLAKE2-256 | 83eddd5d5efb0de9b35fcd7fa9722f2674056ff72738fd4d9e04a44215165381 |
Hashes for pyrus_decision_tree-0.1.1-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2de7925192193403337d48fb4fc7d81fbb619834f31e769ee30345efecd577c6 |
|
MD5 | 0c1f2b1cadac539cc4005c13c3976dfa |
|
BLAKE2-256 | 89bff928b6497c8d534274fa0ab2685d3516c1804e5c8e18bbe964205a42242d |
Hashes for pyrus_decision_tree-0.1.1-cp27-cp27mu-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 601c5b722f31f71c6d0c0b42422861476446752a925884070be17ea83568c150 |
|
MD5 | a15162e1d143d33a7fa011eca6840f8f |
|
BLAKE2-256 | 497005d8e6023641e07f4edeb6bf2ff43db34358b3ad65f30f5122f16684f309 |