Skip to learning content

DATA SCIENCE PYTHON PLAYGROUND

Machine Learning · Learn / Refresh

← Choose a deckQUESTIONS · MODELS · EVIDENCE
DECK 2

Supervised Workflow

Prepare, validate, debug and demonstrate readiness on unfamiliar data.

01 / Prepare

W01Core · teaching
Explore training data: Training rows, Types and gaps, Inspect before fitTraining rowsTypes and gapsInspect beforefitrow 01numericcheck rangerow 02categorycheck gaps

Explore training data

Keep input exploration inside the training population.

12–18 min · 3 practices
W02Core · teaching
A useful reference: Dummy score, Model score, Same foldsDummy scoreModel scoreSame folds

A useful reference

Compare with a simple predictor that ignores X.

12–18 min · 3 practices
W03Core · teaching
Learn a scale from training rows: Unequal units, Scaled distance, Nearby rowsTrain: fit μ, σNew X: reuseNo test-row fit

Learn a scale from training rows

Distinguish fitting a scale from transforming with it.

12–18 min · 3 practices
W04Core · teaching
Encode categories without inventing order: Category value, One-hot columns, No false orderCategory valueOne-hotcolumnsNo false orderexpress0 · 1 · 0alignedeconomy0 · 0 · 1aligned

Encode categories without inventing order

Preserve a reusable categorical schema.

18–25 min · 4 practices
W05Core · teaching
Prepare different feature types together: Numeric: scale, Category: encode, EstimatorNumeric: scaleCategory: encodeEstimator

Prepare different feature types together

Apply each preparation to the intended columns.

12–18 min · 3 practices
W06Core · teaching
Keep preparation with the estimator: Prepare in pipe, Fit each fold, Predict new rowsPrepare inpipeFit eachfoldPredict newrows

Keep preparation with the estimator

Fit and predict through one pipeline.

12–18 min · 3 practices
W07Core · teaching
Learn missing-value replacements safely: Missing value, Train median, Reuse at predictMissing valueTrain medianReuse atpredictmissinglearn 4fill with 4new rowreuse 4no refit

Learn missing-value replacements safely

Fit replacement statistics inside the training workflow.

12–18 min · 3 practices
W-R1Core · review
Preparation retrieval: Impute and scale, Encode categories, Fit within foldsImpute and scaleEncode categoriesFit within folds

Preparation retrieval

Retrieve earlier concepts before combining them.

15–20 min · 3 practices

02 / Validate and compare

03 / Select, diagnose and finish

W11Core · teaching
How a search makes a choice: Try settings, Compare folds, Choose recipeVTTTTVTTTTVTTTTVTry settingsCompare foldsChoose recipe

How a search makes a choice

Understand search boundaries before model-specific tuning.

12–18 min · 3 practices
W12Core · teaching
Diagnose without opening the final test: Out-of-fold, Training only, Test sealedOut-of-foldTraining onlyTest sealed

Diagnose without opening the final test

Use predictions from models that did not fit each diagnostic row.

12–18 min · 3 practices
W13Core · teaching
Finish once, then report: Choose with CV, Refit training, Test only onceChoose withCVRefittrainingTest onlyonce

Finish once, then report

Separate selection from final evidence.

12–18 min · 3 practices
W14Core · teaching
Respect time: Earlier fit, Later validate, Latest testEarlier fitLater validateLatest test

Respect time

Validate in the direction the model will be used.

18–25 min · 4 practices
W-R2Core · review
Workflow evidence retrieval: Compare CV, Diagnose errors, Open test onceCompare CVDiagnose errorsOpen test once

Workflow evidence retrieval

Retrieve earlier concepts before combining them.

15–20 min · 3 practices
W-K1Core · checkpoint
Supervised Workflow checkpoint: Mixed inputs, Shared folds, Final RMSEMixed inputsShared foldsFinal RMSE

Supervised Workflow checkpoint

Build a mixed LinearRegression pipeline, compare a mean reference with five-fold CV, create OOF residuals, keep defaults and report final RMSE. No tree tuning is required.

25–35 min · 1 practices

04 / Debug and demonstrate readiness