0

I am trying to run a decision tree regressor but keep getting an error which I am unfamiliar with and cannot seem to fix.

'''

from dtreeviz import *

X = df[[ 'free sulfur dioxide', 'total sulfur dioxide', 'density', 'pH', 'sulphates', 'alcohol']]

y = df[['quality']]
from sklearn.tree import DecisionTreeRegressor
regressor = DecisionTreeRegressor(max_depth=3, random_state=2023)
regressor.fit(X, y)
viz = dtreeviz(regressor,
               X,
               y,
               target_name='quality',
               feature_names=[ 'free sulfur dioxide', 'total sulfur dioxide', 'density', 'pH', 'sulphates', 'alcohol'] 
               )
viz 

'''

Error as below: enter image description here

S.Elgar
  • 25
  • 4

0 Answers0