Categorical Variable imputation with Feature-engine
Вставка
- Опубліковано 5 вер 2024
- In this video we're going to do missing category imputation with Feature- engine. Missing category imputation consists in replacing missing data in categorical variables by the string “missing”.
We load a mixture of numerical and categorical variables from the house prices data set. We divide the data set into train and test and then we call the categorical variable imputer from Feature-engine. We can do so without passing any arguments. If we don't indicate the variables that we want to impute this categorical imputer will automatically find all categorical variables in the data set.
With the method fit, the transformer finds the categorical variables in the data set, or corroborates that the variables indicated by the user are indeed categorical. With the method transform, the transformer replaces missing data in these variables with the string missing.
You can learn more about Feature-engine in the following articles:
www.trainindat...
www.trainindat...
why it is reporting no module 'feature engine' in spyder and jupyter notebook?
simply because you need to download the library...
To learn more about Feature-engine visit:
feature-engine.trainindata.com/
To learn more about Feature Engineering visit:
www.trainindata.com/p/feature-engineering-for-machine-learning
Check the documentation here: feature-engine.trainindata.com/en/latest/api_doc/imputation/CategoricalImputer.html