**Ordinary Least Squares in Python | DataRobot**
https://www.datarobot.com/blog/ordinary-least-squares-in-python/

Now we perform the regression of the predictor on the response, using the sm.OLS class and and its initialization OLS(y, X) method. This method takes as an input two array-like objects: X and y.In general, X will either be a numpy array or a pandas data frame with shape (n, p) where n is the number of data points and p is the number of predictors.y is either a one-dimensional numpy array or a ...

**DA:** 1 **PA:** 39 **MOZ Rank:** 59