Skip to main content
All Questions

Write a MapReduce algorithm for the closed-form OLS solution when the number of rows n is far too large for one machine, the number of features k is small and you have m machines.

Unlock detailed company stats for this questionUpgrade
You have a data matrix X of shape (n, k) and labels Y of shape (n, 1) and want the ordinary least squares fit. n is far too large for one machine, k is small, and m machines can share the work. Write a MapReduce algorithm that computes the closed-form solution.

Community answers

No answers contributed by the community yet.

Related courses

Course

SQL Interview Prep Course

Prepare for SQL interviews with lessons on joins, aggregations, and window functions, then practice real SQL interview questions in an interactive editor with expert solutions.

Course

Data Science Interview Prep

Land your dream data science role at Google, Amazon, Microsoft, Meta, Apple, and other top companies. Learn from mock interviews, frameworks, and advice from senior candidates. Practice statistics, experimentation, coding, SQL, machine learning, behavioral interviews, and more.