sklearn
provides pipeline apis in builtSklearn
provides a library of transformer fro data preprocessing
sklearn.preprocessing
) - standarization, missing value imputationsklearn.feature_extraction
) for extraction of featuressklearn.decomposition.pca
)sklearn.kernel_approximation
)fit
- method learns model parameter from a traininng settransform
- method applies the learnt transformer to the new datafit_transform
- perform function of both fit
and transform
sklearn.feature_extraction
→
Feature extraction from images and text →
sklearn.feature_extraction.image.*
sklearn.feature_extraction.text.*
sklearn.impute
functionality to fill missing values
KNNImputer
-
n_neighbours
is a parameterfrom sklearn.impute import KNNImputer
knn = KNNImputer(n_neighbors=5, weights= 'uniform')
knn.fit_transform(x)
SimpleImputer
‘mean’, ‘median’, ‘most_frequent’, ‘constant’
from sklearn.impute import SimpleImputer
si = SimpleImputer(strategy='mean')
si.fit_transform(x)