Start learning →

Claude Linear Regression and Supervised Learning — practice questions

Explore 13 free Linear Regression and Supervised Learning questions in Claude Aifoundations. Open each question or exercise to read its content, reference answers and available explanation.

Practise Linear Regression and Supervised Learning with Quill →

Linear Regression and Supervised Learning questions and exercises with answers

Showing questions 1–13 of 13.

Worked practice questions

The SUPERVISED-learning setup gives the learner

  1. Labelled (x, y) pairs and asks the learner to predict y on new x
  2. Only a reward signal, no inputs
  3. A graph structure with no node labels
  4. Only inputs x without any labels
Show answer and solution

Correct answer: A. Labelled (x, y) pairs and asks the learner to predict y on new x

Supervised learning is parametrised by a labelled training set {(x⁽ⁱ⁾, y⁽ⁱ⁾)} and learns h(x) ≈ y. Unsupervised has only x; reinforcement learns from a reward signal.

Open this question →

Linear regression assumes the hypothesis function h_θ(x) takes the form

  1. h_θ(x) = θ⁰ · 2^x
  2. h_θ(x) = θᵀx (with x₀ = 1 to absorb the intercept)
  3. h_θ(x) = sin(θᵀx)
  4. h_θ(x) = 1 / (1 + exp(−θᵀx))
Show answer and solution

Correct answer: B. h_θ(x) = θᵀx (with x₀ = 1 to absorb the intercept)

h(x) = θᵀx with x₀ = 1 convention. **Option D is the LOGISTIC sigmoid (used for logistic regression), not linear regression.**

Open this question →

The least-squares cost function in CS229 linear-regression notes is

  1. J(θ) = Σ y⁽ⁱ⁾
  2. J(θ) = Σ log(h(x⁽ⁱ⁾))
  3. J(θ) = Σ |h(x⁽ⁱ⁾) − y⁽ⁱ⁾|
  4. J(θ) = ½ Σ (h(x⁽ⁱ⁾) − y⁽ⁱ⁾)²
Show answer and solution

Correct answer: D. J(θ) = ½ Σ (h(x⁽ⁱ⁾) − y⁽ⁱ⁾)²

Least-squares cost J(θ) = ½ Σᵢ (h_θ(x⁽ⁱ⁾) − y⁽ⁱ⁾)². The ½ disappears under differentiation, making the gradient cleaner.

Open this question →

How to practise

  1. Choose a Linear Regression and Supervised Learning question and try to work out your answer.
  2. Open the question to check the correct answer and read its worked solution.
  3. Continue in the app for bite-sized lessons, explanations and review with Quill. You can start without creating an account.

More Aifoundations topics