Curated · Bias-Variance Trade-off

MCQ · 1 mark · Problem ML-BVAR-0007

Assume we have trained a linear regression model on a dataset with two features:weight (in kilograms) height (in meters). The model learned the parameters \(w_0\), \(w_1\), and \(w_2\), where \(w_0\) is the bias, \(w_1\) corresponds to weight (in kilograms), and \(w_2\) corresponds to height (in meters). Now, if we change the unit of weight to grams and retrain the model on the same dataset, how will the learned weight parameters \(w_1\) and \(w_1\) change?
  1. A
    \(w_1\) will increase by a factor of 1000, \(w_2\) will remain the same.
  2. B
    \(w_1\) will decrease by a factor of 1000, \(w_2\) will remain the same.
  3. C
    Both \(w_1\) and \(w_2\) will increase by a factor of 1000.
  4. D
    Both \(w_1\) and \(w_2\) will remain unchanged.

Solve it on GATE DA practice →More Model Validation & Neural Networks problems

Show the worked solutionStep 1: Original model (units: weight in kg, height in m): \(y = w_0 + w_1 x_{\text{weight(kg)}} + w_2 x_{\text{height(m)}}\) Step 2: Change unit of weight to grams: 1 kg = 1000 g, so the new feature value is \(x'{\text{weight(g)}} = 1000 \cdot x{\text{weight(kg)}}.\) Step 3: Let the retrained model (with weight in grams) have coefficient \(w'1\) for the weight feature. To represent the same relationship between inputs and output, we must have for every data point: \(w_1, x{\text{weight(kg)}} = w'1, x'{\text{weight(g)}}.\) Substitute \(x'{\text{weight(g)}} = 1000,x{\text{weight(kg)}}\): \(w_1, x_{\text{weight(kg)}} = w'1,(1000,x{\text{weight(kg)}}).\) Cancel \(x_{\text{weight(kg)}}\) (nonzero for typical datapoints): \(w_1 = 1000, w'_1 \quad\Rightarrow\quad w'_1 = \dfrac{w_1}{1000}.\) Step 4: The height feature unit was not changed, so its coefficient remains the same: \(w'_2 = w_2.\) Final Answer: \({\text{ }w_1 \text{ will decrease by a factor of }1000,\quad w_2 \text{ will remain the same.}}\)

GATE DA practice: past exam problems by chapter, with worked solutions · gatedaprep.com