Skip to content

Instantly share code, notes, and snippets.

@JarrydWannenburg
Created August 26, 2022 19:31
Show Gist options
  • Save JarrydWannenburg/a1e7484ab0109f23a7f0ffb05732637e to your computer and use it in GitHub Desktop.
Save JarrydWannenburg/a1e7484ab0109f23a7f0ffb05732637e to your computer and use it in GitHub Desktop.
Scalable_Pipeline_Article
# Using ColumnTransformer and Selector to choose which columns to use
preprocessor = ColumnTransformer([
('cat', cat_pipe, Selector(dtype_exclude=np.number)),
('num', num_pipe, Selector(dtype_include=np.number))
])
# Combining the processor with a model for a happy ending :)
full_pipe = Pipeline(steps=[
('features', preprocessor),
('model', SVC())
])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment