Back to the lessonPreparing the printout…

Fundamental of Machine Learning · Module 3: Model Evaluation and Optimization

Capstone Practice: Re-run the Entire Workflow on Your Own Data

[markdown] content available only on the platform

[markdown] content available only on the platform

Flashcards · Capstone Practice: Re-run the Entire Workflow on Your Own Data

Workflow template — The reusable sequence load, split x/y, train/test split, standardise, train, predict, evaluate.

The diabetes notebook applied to a new CSV.

Target column — The column you want to predict; it must be changed when you switch datasets.

target = 'Outcome' -> target = 'target'

data.isna().sum() — Counts missing values in each column; check it before scaling.

Glucose 0, Insulin 5 ...

Numeric features requirement — StandardScaler and most models need numeric inputs, so text columns must be encoded first.

pd.get_dummies(data, columns=['city'])

Label meaning — What each class value represents; needed to choose the positive class and interpret recall.

Breast cancer data: 0 = malignant, 1 = benign.

load_breast_cancer(as_frame=True) — Loads a built-in scikit-learn dataset as a pandas DataFrame for practice.

data = load_breast_cancer(as_frame=True).frame

Sanity checks — Quick checks of shapes, counts and lengths after each step to catch mistakes early.

len(y_pred) == len(y_test)

Fundamental of Machine Learning · Capstone Practice: Re-run the Entire Workflow on Your Own Data · printed on November 20, 2026