Skip to main content

A Decision Tree Visualization Packages.

Project description

A Decision Tree Visualization Packages.


# import dtreeplot package model_plot function  


from dtreeplot import model_plot  

from sklearn import datasets  
from sklearn.tree import DecisionTreeClassifier   

X, y = datasets.make_classification(n_samples=30000, n_features=10, weights=[0.96, 0.04])  
features = [f'Var{i+1}' for i in range(X.shape[1])]  


clf = DecisionTreeClassifier(criterion='gini',  
                             max_depth=3,   
                             min_samples_split=30,   
                             min_samples_leaf=10,   
                             random_state=1234)  
model = clf.fit(X, y)  

# visualize tree model  
model_plot(model, features, labels=y, height=530)  
pip3 install dtreeplot --upgrade

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

dtreeplot-0.1.2-py3-none-any.whl (98.7 kB view details)

Uploaded Python 3

File details

Details for the file dtreeplot-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: dtreeplot-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 98.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.3

File hashes

Hashes for dtreeplot-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ae29a638c54eb0b6bf15c4fdd09f4d0747ae7148297b9efbc50b81045936d9de
MD5 d70c27cb95aad261271ff2c50c4084e0
BLAKE2b-256 d1660773a4672c2dcb854234ff737164618e3387d87f6ec4bf9f9bae795fe949

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page