title: Xgboost plottree error: Unable to parse node: 0:[petal
body: <p>I'm trying to use the plot_tree as in this <a href="https://machinelearningmastery.com/visualize-gradient-boosting-decision-trees-xgboost-python/" rel="nofollow noreferrer">tutorial</a></p>
  
  <p>I'm using the iris dataset to train the model, this is the code I have:</p>
  
  <pre><code>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()
  </code></pre>
  
  <p>From there, I'm getting this error: </p>
  
  <pre><code>ValueError: Unable to parse node: 0:[petal
  </code></pre>
  
  <p>I don't know where to look for that since the model does the training and prediction without issues. </p>
  
  <p>I'm using version '0.20.3' of sklearn</p>
  
  <p><a href="https://i.stack.imgur.com/EfrVl.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/EfrVl.png" alt="enter image description here"></a></p>