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

2016-03-13 Thread Joel Nothman
We should probably be escaping feature names internally. It's easy to forget that graphviz supports HTML-like markup. On 14 March 2016 at 08:00, Andreas Mueller wrote: > Try escaping the &. > > On 03/12/2016 02:57 PM, Raphael C wrote: > > The code snippet should have been > >

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

2016-03-13 Thread Andreas Mueller
Try escaping the &. On 03/12/2016 02:57 PM, Raphael C wrote: > 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,

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,