You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
v = viz_model.view() # render as SVG into internal object
v.show() # pop up window
v.save("/tmp/iris.svg") # optionally save as svg
In a notebook, you can render inline without calling show(). Just call view():
viz_model.view() # in notebook, displays inline
The text was updated successfully, but these errors were encountered:
sabya39
changed the title
AttributeError: module 'dtreeviz' has no attribute 'model'
AttributeError: module 'dtreeviz' has no attribute 'model' on Windows platform, works fine on Google colab
Nov 30, 2023
Getting AttributeError: module 'dtreeviz' has no attribute 'model' when executing the README code below
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
v.show() # pop up window
v.save("/tmp/iris.svg") # optionally save as svg
In a notebook, you can render inline without calling show(). Just call view():
viz_model.view() # in notebook, displays inline
The text was updated successfully, but these errors were encountered: