1

My goal is to visualize the results of a gradient boosting classifier.

from sklearn.ensemble import GradientBoostingClassifier 
clf_gbc = GradientBoostingClassifier(random_state=42)
pipe = Pipeline(steps=[('SELECT', selector), ('GBC', clf_gbc)])
parameters_gbc = {'GBC__min_samples_split': [1, 5, 10, 15, 20, 25, 30],
             'GBC__max_depth': [3,4,5,6,7,8],
             'GBC__min_samples_leaf': [1, 5, 10, 15, 25, 30]}
grid = GridSearchCV(estimator=pipe, param_grid=parameters_gbc, cv=cv, scoring = 'f1')
grid.fit(features_train, labels_train)
clf=grid.best_estimator_

import pydotplus
dot_data = tree.export_graphviz(clf, out_file=None)
graph = pydotplus.graph_from_dot_data(dot_data) 
graph.write_pdf("gbc.pdf") 

I get the error ImportError: No module named pydotplus. I installed pydotplus using pip install pydotplus.

Any help on this or on how to visualize the results of a gradient boosting classifier would be appreciated!

Moiz Kapadia
  • 73
  • 1
  • 7
  • did you try : `conda install pydotplus` ? Are you using jupyter notebook (installed with Anaconda) ? – MMF Nov 09 '16 at 11:05
  • I tried `conda install pydotplus` in the cmd line and I get an error that says `PackageNotFoundError: Package not found: '' Package missing in current win-64 channels`. Yes, I'm using jupyter notebook installed with Anaconda – Moiz Kapadia Nov 09 '16 at 20:05

0 Answers0