Implementação dos algoritmos de árvore de decisão ID3, C4.5 e CART do zero
Project description
Minhas Árvores
Implementação educacional dos algoritmos ID3, C4.5 e CART em Python.
Instalação
pip install numpy pandas scikit-learn
Uso
from minhas_arvores import ID3, C45, CART
import pandas as pd
dados = pd.DataFrame({
'Tempo': ['Sol', 'Nublado', 'Chuva'],
'Jogar': ['Não', 'Sim', 'Sim']
})
X = dados[['Tempo']]
y = dados['Jogar']
# Treinar
id3 = ID3()
id3.fit(X, y)
# Predizer
resultado = id3.predict({'Tempo': 'Sol'})
print(resultado)
Exemplo Completo
python exemplo_uso.py
Algoritmos
- ID3: Ganho de informação, categóricos apenas
- C4.5: Razão de ganho, suporta contínuos e missing values
- CART: Gini index, divisões binárias
Licença
MIT
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.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file arvores_henrique_soares-1.0.0.tar.gz.
File metadata
- Download URL: arvores_henrique_soares-1.0.0.tar.gz
- Upload date:
- Size: 14.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
458c210fbc6d45da6d0b8b6bb1758580f049967b53efe0d2c92d6095fe4b4365
|
|
| MD5 |
2199743a098f3c06a5ca3d3f7c7a90ca
|
|
| BLAKE2b-256 |
f1828543a53a0c02675e89ac7bbd77864ecefb773049295403d361571fc80a92
|
File details
Details for the file arvores_henrique_soares-1.0.0-py3-none-any.whl.
File metadata
- Download URL: arvores_henrique_soares-1.0.0-py3-none-any.whl
- Upload date:
- Size: 19.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1d348c2e31fbd1c5b4b1e0855ea48cc765254a777c9c8dd260fabbe2bfc6da5f
|
|
| MD5 |
f17f2f33bbfa46d807bc026674a41dc6
|
|
| BLAKE2b-256 |
fdd5a440cdef90dfe2be0a82da6596e0ab8074fd8c28928f26689be51f416803
|