dtreeplot-0.1.2
توضیحات
A Decision Tree Visualization Packages.
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | dtreeplot-0.1.2 |
| نام | dtreeplot |
| نسخه کتابخانه | 0.1.2 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | suyin |
| ایمیل نویسنده | suyin1203@gmail.com |
| آدرس صفحه اصلی | - |
| آدرس اینترنتی | https://pypi.org/project/dtreeplot/ |
| مجوز | - |
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
```
نحوه نصب
نصب پکیج whl dtreeplot-0.1.2:
pip install dtreeplot-0.1.2.whl
نصب پکیج tar.gz dtreeplot-0.1.2:
pip install dtreeplot-0.1.2.tar.gz