What is a Dummy Regressor (strategy = 'median')?
Great question! Let’s carefully go through it.
What is a Dummy Regressor (strategy = 'median')?
A DummyRegressor simply ignores the input features .
-
With strategy='median', it always predicts the median of the target variable in the training data.
-
So, the given test input doesn’t matter at all.
Step 1: Collect Y values from dataset
Step 2: Sort the Y values
Step 3: Find the median
Since there are 6 values (even count), median = average of 3rd and 4th values.
✅ Final Answer
The Dummy Regressor will always predict:
So the correct option is 11.0.
Would you like me to also explain how the answer would change if strategy="mean" instead of "median"?
Comments
Post a Comment