본문으로 건너뛰기

Level 1 Mini Checkpoint — Regression Experiment Review

Complete this checkpoint after L1.9 — Multiple Features. This checkpoint does not get a new L1.x number because it reviews the first half of the Level rather than introducing a new lesson topic.

Its purpose is to check whether the ideas are usable, not merely familiar.

For each answer, try to do two things:

  1. state the rule in ordinary language;
  2. connect the rule to the specific scenario below.

If you can only name a term such as “leakage” or “gradient descent” without explaining why it applies, return to the related lesson and trace one concrete example again.

Scenario​

You want to predict apartment energy use from:

  • floor area in square meters;
  • number of occupants;
  • building age in years.

You have 120 rows. A teammate proposes this workflow:

  1. standardize all 120 rows;
  2. split the standardized data into train and test sets;
  3. fit linear regression;
  4. report test mean squared error;
  5. change three model/data choices 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 data only.

A strong answer identifies which statistics the scaler learns and why test rows must not influence those statistics.

Check 2 — Predict shapes​

If 90 rows are used for training and there are three features:

  • what is the expected shape of X_train?
  • what is the expected shape of y_train?
  • how many coefficients should a linear model learn, not counting its intercept?

Do not stop at the shape strings. Explain what each dimension counts.

Check 3 — Loss behavior​

Two test predictions have errors of 2 and 8 units.

  • Compare their absolute-error contributions.
  • Compare their squared-error contributions.
  • Explain why mean squared error reacts strongly to the larger miss.

A strong answer should make the difference visible with the actual numbers rather than only saying “MSE cares more about outliers.”

Check 4 — Optimization diagnosis​

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 your diagnosis.

There may be more than one reasonable hypothesis. What matters is that your proposed change actually tests the explanation you gave.

Check 5 — Reproducible comparison​

Write down the minimum experiment record another learner needs to repeat your comparison. Include at least:

  • dataset/source revision;
  • train/test strategy and random seed;
  • preprocessing;
  • model settings;
  • evaluation metric.

Then ask: if one of these fields were missing, could another person accidentally run a materially different experiment while believing it was the same one?

Check your reasoning after you try
  • Check 1: the scaler must learn its mean and scale from the training rows only. A fair order is split first, fit the scaler on train, then transform train and test with that fitted scaler.
  • Check 2: X_train is (90, 3), y_train has 90 target values, and the model learns three feature coefficients plus an intercept.
  • Check 3: absolute errors contribute 2 and 8. Squared errors contribute 4 and 64, so the larger miss has much more influence under MSE.
  • Check 4: the late loss increase is consistent with updates that became too aggressive or unstable. Test one change at a time, such as a smaller learning rate, and look for a smoother loss trace.
  • Check 5: another learner needs the same data revision, split/seed, preprocessing, model settings, and metric. Missing any one can create a different experiment while keeping the same label.

Before moving on​

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

A useful final test is to imagine a new dataset—perhaps predicting bicycle rentals or delivery time—and explain how the same five ideas would carry over. If the reasoning only works for the apartment example, review the related lesson and try one more transfer example.

Lesson actions

Completion is stored locally on this device.

View progress