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
> >
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,
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,