Skip to content

Instantly share code, notes, and snippets.

@elisim
Last active September 2, 2021 09:17
Show Gist options
  • Save elisim/1f14260d95f01a308c0562ddb20a6ffb to your computer and use it in GitHub Desktop.
Save elisim/1f14260d95f01a308c0562ddb20a6ffb to your computer and use it in GitHub Desktop.
Hydra-Sklearn Blog - Code example 1
from sklearn.feature_selection import VarianceThreshold
from sklearn.impute import SimpleImputer
from sklearn.pipeline import Pipeline
from sklearn.preprocessing import StandardScaler
num_pipeline = Pipeline(
[
("scaler", StandardScaler()),
("VarianceThreshold", VarianceThreshold(threshold=0.1)),
("imputer", SimpleImputer(strategy="constant", fill_value="-1")),
]
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment