Skills101
← All practice quizzes

Quiz: Regularisation (Ridge and Lasso)

5 questions · new set on every retakeNo time limitPass: 60%+10 XP on first pass

Why a model can be too simple or too flexible, how a penalty on large weights tames overfitting, Ridge and Lasso built with NumPy, how Lasso picks features by setting weights to zero, and how to choose the penalty strength with validation data.

Log in to take the quiz

Free account · see your score, answers and explanations, earn XP

  1. Question 1

    A model has low training error but very high error on new data. What is this called?

  2. Question 2

    What does Ridge regression add to the ordinary MSE loss?

  3. Question 3

    As the Ridge penalty λ increases, what happens to the TRAINING error?

  4. Question 4

    Which method can set some weights to exactly zero, acting as feature selection?

  5. Question 5

    What does this print?

    import numpy as np
    w = np.array([3.0, -4.0])
    print(np.sum(w ** 2), np.sum(np.abs(w)))
    
🎯 Today’s placement challenge — 10 questions, no login. Can you score 10/10?Take today’s challenge →