Paths Subjects Questions Quizzes Pricing Search
Intermediate Open Pro

Normal Equation vs Gradient Descent

You need to fit a linear regression in three settings:

  • (a) 20,000 rows, 30 features, one-off analysis in a notebook.
  • (b) 50 million rows, 2,000 dense features, retrained nightly on a single machine with 32 GB RAM.
  • (c) 5 million rows, 3 million sparse one-hot features (n-grams), trained once.
  1. For each setting, choose closed-form OLS or (stochastic) gradient descent and justify with rough cost reasoning.
  2. Your colleague runs gradient descent on setting (a) with raw features (income in dollars, age in years) and reports it "barely moves after 10,000 iterations." Diagnose and fix.
  3. Does feature scaling change the closed-form solution's predictions? Its coefficients?

Share this question

← Back to Linear Regression practice

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