본문으로 건너뛰기

Level 1 Mini Checkpoint — Regression Experiment Review

Complete this checkpoint after L1.8 — Multiple Features. It reviews the supervised regression foundation before classification begins.

For each answer, state the rule in ordinary language and connect it to the scenario.

Scenario​

You want to predict apartment energy use from floor area, number of occupants, and building age. You have 120 rows.

A teammate proposes:

  1. standardize all 120 rows;
  2. split into train and test sets;
  3. fit linear regression;
  4. report test mean squared error;
  5. change several settings at once if the score looks bad.

Check 1 — Find the unfair step​

Explain why fitting the scaler before the split is a problem. Rewrite the order so learned preprocessing uses training rows only.

Check 2 — Predict shapes​

If 90 rows are used for training and there are three features, state the shapes of X_train and y_train and explain what each dimension counts.

Check 3 — Compare losses​

Two predictions miss by 2 and 8 units. Compare their absolute-error and squared-error contributions. Explain why squared error reacts more strongly to the larger miss.

Check 4 — Diagnose optimization​

A hand-built gradient-descent model shows this loss history:

120, 75, 46, 31, 29, 44, 90

Give one plausible optimization diagnosis and one controlled change you would test next. State what evidence would support the diagnosis.

Check 5 — Record the experiment​

List the minimum information another learner needs to repeat the comparison: dataset revision, split strategy and seed, preprocessing, model settings, and evaluation metric.

Check your reasoning after you try
  • Check 1: split first, then fit the scaler on training rows and reuse those training-fitted statistics on test rows.
  • Check 2: X_train is (90, 3), y_train has 90 target values, and the linear model learns three feature coefficients plus an intercept.
  • Check 3: absolute errors contribute 2 and 8; squared errors contribute 4 and 64.
  • Check 4: the late increase is consistent with unstable updates. A smaller learning rate is one controlled test; look for a smoother decreasing loss path.
  • Check 5: without the same data, split, preprocessing, settings, and metric, another learner can accidentally run a materially different experiment.

Before moving on​

You are ready for L1.9 — Classification when you can explain all five checks without relying on “the library handles it.”

Lesson actions

Completion is stored locally on this device.

View progress