Simple linear regression, polynomial fitting, and multiple OLS —
mirrors scipy.stats.linregress, numpy.polyfit, and
statsmodels.OLS.
linregress(x, y) returns slope, intercept, Pearson r, p-value, and standard error.
polyfit(x, y, deg) fits a polynomial of degree deg. Use polyval to evaluate it.
new OLS().fit(X, y) fits multiple linear regression, returning params, R², F-statistic, and a formatted summary.
Use result.predict(Xnew) to generate predictions for new observations.