Skip to content

Instantly share code, notes, and snippets.

@carlleston
Created October 26, 2019 02:01
Show Gist options
  • Save carlleston/7e3c9e6d254af8b3b98d687d610bd5bf to your computer and use it in GitHub Desktop.
Save carlleston/7e3c9e6d254af8b3b98d687d610bd5bf to your computer and use it in GitHub Desktop.
regr = RandomForestRegressor(random_state = 100,bootstrap = True, max_depth=2,max_features=2,min_samples_leaf=3,min_samples_split=5,n_estimators=3)
pipe = Pipeline([
('scaler', StandardScaler()),
('reduce_dim', PCA()),
('regressor', regr)
])
pipe.fit(X_train,y_train)
ypipe=pipe.predict(X_test)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment