how to fill missing values in dataset-scikit learn imputation

Опубликовано: 07 Август 2020
на канале: Coder's Digest
5,269
86

In this video we will learn how to fill missing values in dataset
#missing values in machine learning
#Scikit learn tutorial
#Handle Missing data easily
#Dealing with missing data explained
#MachineLearning
#Missing Data in categorical features
#Data Science
#Frequent Category imputation
#easy way to impute data in python
#easy way to impute data using pandas
#Fill missing values
#data imputation in machine learning
#Pandas tutorial
missing value treatment
Machine learning tutorial

link to mean median imputation :    • Mean Median imputation | handling mis...  
link to Mode imputation for categorical features:    • How To Handle Missing Values in Categ...  

Missing Data is something no Data scientist want to come across but there are many reasons for Data to be missing. E.g lets say the customer does not want to give data or we can say that who ever is collecting the data might have missed it or we can say in verbal communication a lot of data is missed.

Steps:
import pandas as pd
import numpy as np
from sklearn.impute import SimpleImputer

numeric_cols = columns_to_use = ['MSSubClass','LotFrontage', 'LotArea',
'OverallQual', 'OverallCond','YearBuilt','YearRemodAdd', 'MasVnrArea','BsmtFinSF1', 'BsmtFinSF2', 'BsmtUnfSF', 'TotalBsmtSF']

imputer.fit(data)
imputer.statistics_
data = imputer.transform(data)

data_1 = pd.DataFrame(data, columns=numeric_cols)

realted tags :
python
analytics
machine learning
imputer
dropna
fillna
features
target
dependent variables
independent variables
sklearn
imputer sklearn example
sklearn imputer
machine learning preprocessing
sklearn.preprocessing
imputer
imputer find the missing values in python
imputer.fit
fit_transform
imputer on missing values python
python imputer example
imputer sklearn
imputer python
how to use imputer
imputer function in python
tags :
#SimpleImputer #Data_Preprocessing #machine_learning #i_know_python
scikit-learn tutorial

import scikit-learn

scikit-learn vs tensorflow

scikit-learn pronunciation

scikit-learn documentation

scikit-learn download

scikit-learn examples

scikit-learn linear regression

Thanks.