KrisLibrary
1.0.0
|
1-D least squares y = ax+b More...
#include <OLS.h>
Public Member Functions | |
LeastSquares1D (const Vector &x, const Vector &y) | |
LeastSquares1D (const Vector &x, const Vector &y, const Vector &weights) | |
bool | Solve () |
standard least-squares, y as fn of x | |
bool | SolveUnweighted () |
ignores weights w, if defined | |
bool | SolveWeighted () |
weighted least-squares | |
bool | SolvePerpendicular () |
perpendicular least-squares | |
Public Attributes | |
const Vector & | x |
const Vector & | y |
const Vector * | w |
Real | a |
Real | b |
coefficients a,b | |
Real | stda |
Real | stdb |
standard errors for a,b | |
Real | corrCoeff |
correlation coefficient | |
1-D least squares y = ax+b
Can solve normal, weighted, or perpendicular least-squares