Dtreeviz

Latest version: v2.2.2

Safety actively analyzes 629723 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 7

2.1.1

Single feature release:

[Enhanced ctree_feature_space() that accepts a features arg rather than requiring a model with just 1 or 2 features](https://github.com/parrt/dtreeviz/pull/253)

2.1.0

This is a major cleanup release, with mepland doing most of the heavy lifting; there are refactorings, if you bug fixes, and lots of visualization clean up.

Issues fixed
* [TF handle multi class labels for view visualisation](https://github.com/parrt/dtreeviz/issues/248) (bug)
* [Standardize Capitalization](https://github.com/parrt/dtreeviz/issues/243) (clean up)
* [KeyError when using decision_boundaries function](https://github.com/parrt/dtreeviz/issues/238) (clean up)
* [Dimension issue in dtreeviz_sklearn_pipeline_visualisations.ipynb](https://github.com/parrt/dtreeviz/issues/231) (compatibility)
* [font name/size not respected](https://github.com/parrt/dtreeviz/issues/229) (bug)
* [Boston dataset no longer avaliable in sklearn for classifier-decision-boundaries.ipynb and classifier-boundary-animations.ipynb](https://github.com/parrt/dtreeviz/issues/225) (clean up)
* [`ctree_leaf_distributions()` should use the classnames not classes](https://github.com/parrt/dtreeviz/issues/202) (bug)
* [rtreeviz_univar() does not show X feature properly](https://github.com/parrt/dtreeviz/issues/198) (bug)
* [class name font could not change](https://github.com/parrt/dtreeviz/issues/145) (bug)
* [labels too close to the axes overlap for classifiers](https://github.com/parrt/dtreeviz/issues/113) (enhancement)

Improvements, features
* [Order explain_prediction_path()](https://github.com/parrt/dtreeviz/pull/234) (enhancement)
* [Improve _ctreeviz_univar()](https://github.com/parrt/dtreeviz/pull/227) (enhancement)
* [Fix Digraph Graphics](https://github.com/parrt/dtreeviz/pull/224) (enhancement)
* [Allow None legend edge](https://github.com/parrt/dtreeviz/pull/221) (enhancement)
* [ctree_leaf_distributions() label_all_leaves parameter ](https://github.com/parrt/dtreeviz/pull/220) (enhancement)
* [Allow different left and right arrow colors via 'larrow' and 'rarrow'](https://github.com/parrt/dtreeviz/pull/219) (enhancement)
* [Add matplotlib default colors as mpl_colors](https://github.com/parrt/dtreeviz/pull/216) (enhancement)
* [Add option to plot classifier leaves as horizontal bars](https://github.com/parrt/dtreeviz/pull/215) (enhancement)
* [labels too close to the axes overlap for classifiers](https://github.com/parrt/dtreeviz/issues/113) (enhancement)

Contributors
* 19 items: [Matthew Epland](https://github.com/mepland) (mepland)
* 5 items: [Terence Parr](https://github.com/parrt) (parrt)
* 2 items: [Tudor Lapusan](https://github.com/tlapusan) (tlapusan)
* 1 items: [0ptimista](https://github.com/0ptimista)
* 1 items: [Tobias Windisch](https://github.com/windisch) (windisch)
* 1 items: [HidenariUoi](https://github.com/HidenariUoi)

2.0

For backward compatibility to call function `dtreeviz()` and the old API, you can change the import to be:


from dtreeviz import *
dtreeviz(tree_model=clf, X_train, ...)


**Argument name changes**:

If you were previously using internal model adaptors, such as `ShadowLightGBMTree`, please note we have changed the following argument names: `x_data`->`X_train` and `y_data`->`y_train`.

**Stuff we completed**:

https://github.com/parrt/dtreeviz/milestone/30?closed=1

2.0.0

This release re-organizes the API to focus on using a model adaptor that adapts the visualization library to the various supported decision tree libraries.

We simplified the [README](https://github.com/parrt/dtreeviz/blob/master/README.md) and rebuilt all of the library-specific notebooks to demonstrate the new API, using a common set of examples:

* [sklearn-based examples](notebooks/dtreeviz_sklearn_visualisations.ipynb) ([colab](https://colab.research.google.com/github/parrt/dtreeviz/blob/master/notebooks/dtreeviz_sklearn_visualisations.ipynb))
* [LightGBM-based examples](notebooks/dtreeviz_lightgbm_visualisations.ipynb) ([colab](https://colab.research.google.com/github/parrt/dtreeviz/blob/master/notebooks/dtreeviz_lightgbm_visualisations.ipynb))
* [Spark-based examples](notebooks/dtreeviz_spark_visualisations.ipynb) ([colab](https://colab.research.google.com/github/parrt/dtreeviz/blob/master/notebooks/dtreeviz_spark_visualisations.ipynb))
* [TensorFlow-based examples](notebooks/dtreeviz_tensorflow_visualisations.ipynb) ([colab](https://colab.research.google.com/github/parrt/dtreeviz/blob/master/notebooks/dtreeviz_tensorflow_visualisations.ipynb))
* [XGBoost-based examples](notebooks/dtreeviz_xgboost_visualisations.ipynb) ([colab](https://colab.research.google.com/github/parrt/dtreeviz/blob/master/notebooks/dtreeviz_xgboost_visualisations.ipynb))
* [Classifier decision boundaries for any scikit-learn model.ipynb](https://github.com/parrt/dtreeviz/tree/master/notebooks/classifier-decision-boundaries.ipynb) ([colab](https://colab.research.google.com/github/parrt/dtreeviz/blob/master/notebooks/classifier-decision-boundaries.ipynb))
* [Changing colors notebook (specific to sklearn)](notebooks/colors.ipynb) ([colab](https://colab.research.google.com/github/parrt/dtreeviz/blob/master/notebooks/colors.ipynb))

**New API**:


from sklearn.datasets import load_iris
from sklearn.tree import DecisionTreeClassifier
import dtreeviz

iris = load_iris()
X = iris.data
y = iris.target

clf = DecisionTreeClassifier(max_depth=4)
clf.fit(X, y)
viz_model = dtreeviz.model(clf,
X_train=X, y_train=y,
feature_names=iris.feature_names,
target_name='iris',
class_names=iris.target_names)

v = viz_model.view() render as SVG into internal object


**Previous API**:
Previously, we did something like this to call functions and pass in the various details of the model and training data:


from dtreeviz.trees import dtreeviz
dtreeviz(tree_model=clf, X_train, ...)

1.4.1

Fixing this bug: https://github.com/parrt/dtreeviz/issues/196

1.4.0

Add tensorflow decision tree support.

Page 2 of 7

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.