Simple linear regression using straight lines: f(x) = a + bx.
Function or value | Description |
Full Usage:
predict coef x
Parameters:
Coefficients
-
vector of coefficients, sorted as [intercept;slope]
x : float
-
x value of which the corresponding y value should be predicted
Returns: float
predicted y value with given coefficients at X=x
|
Equal to OLS.Linear.Univariable.predict!
Example
|
Full Usage:
theilEstimator xData yData
Parameters: Returns: Coefficients
vector of polynomial coefficients sorted as [intercept;constant;quadratic;...]
|
Calculates simple linear regression coefficients using theil's incomplete method in the form of [|intercept; slope;|]. Performs well if outlier corrupt the regression line. Not robust if data count is low! http://195.134.76.37/applets/AppletTheil/Appl_Theil2.html
Example
|
Full Usage:
theilSenEstimator xData yData
Parameters: Returns: Coefficients
vector of polynomial coefficients sorted as [intercept;constant;quadratic;...]
|
Calculates simple linear regression coefficients using the Theil-Sen estimator in the form of [|intercept; slope;|]. Performs well if outlier corrupt the regression line. Not robust if data count is low!
Example
|