January 2020
Beginner to intermediate
372 pages
10h
English
To complete this recipe, let's import the required libraries and load the data:
import pandas as pdfrom sklearn.model_selection import train_test_splitfrom sklearn.linear_model import BayesianRidgefrom sklearn.experimental import enable_iterative_imputerfrom sklearn.impute import IterativeImputer
variables = ['A2','A3','A8', 'A11', 'A14', 'A15', 'A16']data = pd.read_csv('creditApprovalUCI.csv', usecols=variables)
The models that will be used to estimate missing values should be built on the train data and used to impute values in the train, test, and future data:
Read now
Unlock full access