Skip to content

Instantly share code, notes, and snippets.

@ken333135
Created May 23, 2018 03:21
Show Gist options
  • Save ken333135/bd3fbb0eb1fff80403debb094129d646 to your computer and use it in GitHub Desktop.
Save ken333135/bd3fbb0eb1fff80403debb094129d646 to your computer and use it in GitHub Desktop.
#Create pipeline for GradientBoostingClassifier
params = {'n_estimators': 1200, 'max_depth': 3, 'subsample': 0.5,
'learning_rate': 0.01, 'min_samples_leaf': 1, 'random_state': 3}
GBC_pipeline = Pipeline([
('tfidf',TfidfVectorizer()),
('clf',OneVsRestClassifier(ensemble.GradientBoostingClassifier(**params),n_jobs=1)),
])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment