This project has been archived by its maintainers, and is no longer receiving any updates.
Enhanced Decision Tree (EDT)
What is Enhanced Decision Tree
TODO
Install
There is two option to install EDT library: from PyPi (easy) or from source.
PyPi
Use simple command:
pip install edt
That's it
From source
TODO
Get started
Here some simple example to use EDT
Classical Decision Tree
Construct classical Decision Tree on syntatic dataset:
import endt
x1 = endt.ContinuumData([1.,1.,2.,2.], name="x1")
x2 = endt.ContinuumData([100.,200.,100.,200.], name="x2")
y = endt.ContinuumData([10.,20.,30.,40])
tree = endt.Tree()
tree.fit([x1, x2], y)
print(tree)
res = tree.predict(1,2)
print("predict y(1,2) =", res)
Simple Enhanced Decision Tree
Add LSQ of order 2 in previous code:
import endt
x1 = endt.ContinuumData([1.,1.,2.,2.], name="x1")
x2 = endt.ContinuumData([100.,200.,100.,200.], name="x2")
y = endt.ContinuumData([10.,20.,30.,40])
funcs = endt.func.create_lsq_functions([x1, x2], order=2)
tree = endt.Tree(lsq_funcs=funcs)
tree.fit([x1, x2], y)
print(tree)
res = tree.predict(1,2)
print("predict y(1,2) =", res)
EDT from CSV
Let our dataset save is in the CSV file data.csv, containing two collumn of feature parameters and third collumn of reults
Create EDT from CSV file:
import endt
import numpy as np
data = np.loadtxt("data.csv").T
x = list(map(endt.ContinuumData, data[:-1]))
y = endt.ContinuumData(data[-1])
for i, xi in enumerate(x, start=1):
xi.name = f"x{i}" # set name x1, x2, x3... for every feature parameters
funcs = endt.func.create_lsq_functions(x, order=2)
tree = endt.Tree(lsq_funcs=funcs)
tree.fit(x, y)
print(tree)
res = tree.predict(1,2)
print("predict y(1,2) =", res)
Full documentation
Read full documentation https://nanoworld_ml.gitlab.io/enhanceddecisiontree/
Metadata
Release files for endt 0.11.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| endt-0.11.1.tar.gz | 9.2 kB | Without provenance | Details for endt-0.11.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| endt-0.11.1-py3-none-any.whl | Python 3 | none | any | Details for endt-0.11.1-py3-none-any.whl |
Total release size: 16.9 kB
Release files / endt-0.11.1.tar.gz
| Download URL | endt-0.11.1.tar.gz |
|---|---|
| Size | 9.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a4c32f46275749683f0042deeae0f959eb1581f5478744baed13dbabbd66ac01
|
|
BLAKE2b-256 checksum How to use checksums |
b3aaf60e692c5045b4c7baeaae28885568f802d89aef1b116a6ef4b3267a14d1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.2
|
Release files / endt-0.11.1-py3-none-any.whl
| Download URL | endt-0.11.1-py3-none-any.whl |
|---|---|
| Size | 7.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
99f593034ee74cd7f380d1c03a5c02177d0bef3eb61f33a02c4c152fc4fb3233
|
|
BLAKE2b-256 checksum How to use checksums |
bbb2f6ee15977b852beb2040cf7a3f510b62c945f6f70ea90082b856b14606c7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.2
|
Security for endt 0.11.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.