FunctionRacerProblemsRace

What the Model Learned

Beginnerscikit-learnPython

Fit a linear regression of y on the columns of X. Return a list with the intercept first, then the slope of each column in order.

Example 1

X [[1],[2],[3],[4]]
y [3,5,7,9]
returns [1.0,2.0]

The data follow y = 1 + 2x.

Constraints

Race itor take your time

Write it in your browser, against the clock. The model solution, stepped through line by line, comes after.

More scikit-learn problems