Paths Subjects Questions Quizzes Pricing Search
Intermediate Open Pro

Standardisation, Intercept and Pipeline Placement

A junior data scientist fits Lasso(alpha=0.1) on a house-price dataset with these raw features: sqft (500–5000), bedrooms (1–6), lot_acres (0.05–2.0), year_built (1900–2020). The target is price in dollars. They report that lasso "selected sqft and year_built and dropped bedrooms and lot_acres", and that the intercept came out very close to zero, which they find suspicious.

  1. Why is the feature-selection conclusion untrustworthy as stated? What should they have done, and how would you expect the result to change?
  2. Should the intercept be penalised? What would happen if a hand-written implementation did penalise it, given the target is house price in dollars?
  3. They fix the scaling by calling StandardScaler().fit_transform(X) on the full dataset before running cross_val_score on the lasso. Is there still a problem?

Share this question

← Back to Regularization: L1, L2 and Elastic Net practice

We use cookies for product analytics to improve OmniAtlas. See our Privacy Policy.