I'm trying to use the plot_tree as in this tutorial
I'm using the iris dataset to train the model, this is the code I have:
from numpy import loadtxt
from xgboost import XGBClassifier
from xgboost import plot_tree
import matplotlib.pyplot as plt
import shap
X,y = shap.datasets.iris()
y = pd.Series([v if v==1 else 0 for v in y])
model = XGBClassifier()
model.fit(X, y)
# plot single tree
plot_tree(model)
plt.show()
From there, I'm getting this error:
ValueError: Unable to parse node: 0:[petal
I don't know where to look for that since the model does the training and prediction without issues.
I'm using version '0.20.3' of sklearn
