def fit_linear ( X , y ) : model = linear_model . LinearRegression ( ) model . fit ( X , y ) return model
get fitted values of ols python
Uses OLS to fit the regression .
def fit_linear(X, y):
    """
    Uses OLS to fit the regression.
    """
    model = linear_model.LinearRegression()
    model.fit(X, y)
    return model