Re: [Scikit-learn-general] Restrictions on feature names when drawing decision tree

2016-03-12 Thread Raphael C
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,

[Scikit-learn-general] Restrictions on feature names when drawing decision tree

2016-03-12 Thread Raphael C
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,