Skip to content

Instantly share code, notes, and snippets.

@joferkington
Created October 14, 2014 02:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joferkington/0b858cecc1ee659dd0d8 to your computer and use it in GitHub Desktop.
Save joferkington/0b858cecc1ee659dd0d8 to your computer and use it in GitHub Desktop.
pipeline = sklearn.pipeline.Pipeline([
('Replace nans',
preprocessing.Imputer(strategy='mean')),
('Scale data',
preprocessing.StandardScaler()),
('Feature Selection',
SelectPercentile(f_regression, percentile=60)),
('Regression',
ensemble.ExtraTreesRegressor(
n_estimators=550,
max_features='sqrt',
n_jobs=-1,
random_state=RANDOM_STATE,
oob_score=True,
bootstrap=True,
)),
])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment