The code snippet should have been
reg = DecisionTreeRegressor(max_depth=None,min_samples_split=1)
reg.fit(X,Y)
scores = cross_val_score(reg, X, Y)
print scores
dot_data = StringIO()
tree.export_graphviz(reg, out_file=dot_data,
feature_names=feature_names,
I am attempting to draw a decision tree using:
reg = DecisionTreeRegressor(max_depth=None,min_samples_split=1)
reg.fit(X,Y)
dot_data = StringIO()
tree.export_graphviz(reg, out_file=dot_data,
feature_names=feature_names,
filled=True, rounded=True,