Open kevlariii opened 11 months ago
Having the same issue as you, did you manage to resolve it?
@kevlariii I see that you are using the old API of the library, could you try with the new version ? You can find examples here : https://github.com/parrt/dtreeviz/tree/master/notebooks
If the error still persists, would be very helpful if you could prepare a sharable notebook (like google colab) to investigate the issue. Thanks.
@LegalWiggle if you could provide one also, would be great.
@kevlariii @LegalWiggle Just add dtreeviz .model(
from sklearn.tree import DecisionTreeClassifier, DecisionTreeRegressor
import dtreeviz
print(dtreeviz.__version__)
#---------------------
viz = dtreeviz.model(regr_TreeClassifier_model,
X_train, # pandas.DataFrame
y_train, # pandas.Series
target_name=Y_TARGET,
feature_names=list(X_train.columns) )
viz.view(scale=0.8)
@tlapusan this kind import from dtreeviz import *
could generate errors like this ticket ¿add exception ?
I successfully imported dtreeviz with the command:
from dtreeviz import *
I tried this command:
viz = dtreeviz(clf, xdev, ydev, target_name="isFraud", feature_names = list(xdev.columns), class_names = ['notFraud', 'isFraud'])
I get the error:
TypeError: 'int' object is not subscriptable
Here are my xdev and ydev:
Any idea on where this error might be coming from? Thank you so much!