Deep-ML is a free, open-source machine learning challenge platform. Practice ML coding problems, work with real datasets in labs, and learn through interactive articles.
Please enable JavaScript to use the full platform.
A cloud of points that roughly follows a line through 0. Write best_slope(xs, ys): the slope of the line y = slope * x that best fits the points. Point i is (xs[i], ys[i]).
best_slope(xs, ys)
y = slope * x
i
(xs[i], ys[i])