January 2020
Beginner to intermediate
432 pages
11h 24m
English
Execute the following steps to build the project's pipeline.
import pandas as pdfrom sklearn.model_selection import train_test_splitfrom sklearn.impute import SimpleImputerfrom sklearn.preprocessing import OneHotEncoderfrom sklearn.compose import ColumnTransformerfrom sklearn.tree import DecisionTreeClassifierfrom sklearn.pipeline import Pipelinefrom chapter_8_utils import performance_evaluation_report
df = pd.read_csv('credit_card_default.csv', index_col=0, na_values='')X = df.copy()y = X.pop('default_payment_next_month')X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, stratify=y)
Read now
Unlock full access