This class does the math to compute statistics for FittingWindow.
More...
#include <FittingStatistics.h>
This class does the math to compute statistics for FittingWindow.
Definition at line 19 of file FittingStatistics.h.
◆ FittingStatistics()
FittingStatistics::FittingStatistics |
( |
| ) |
|
◆ ~FittingStatistics()
FittingStatistics::~FittingStatistics |
( |
| ) |
|
|
virtual |
◆ calculateCurveFitAndStatistics()
void FittingStatistics::calculateCurveFitAndStatistics |
( |
unsigned int |
order, |
|
|
const FittingPointsConvenient & |
pointsConvenient, |
|
|
FittingCurveCoefficients & |
coefficients, |
|
|
double & |
mse, |
|
|
double & |
rms, |
|
|
double & |
rSquared, |
|
|
int |
significantDigits |
|
) |
| |
Compute the curve fit and the statistics for that curve fit.
- Parameters
-
order | Requested order of the polynomial to be fitted. This will be reduced if there are not enough points just enough to prevent having an undetermined system (=more degrees of freedom than constraints) since otherwise there will be an infinite number of solutions |
pointsConvenient | Input data consisting of (x,y) points in graph coordinates |
coefficients | Output coefficients a0, a1, and so on in y = a0 + a1 * x + a2 * x^2 + ... |
mse | Mean squared error between the original data and the fitted curve |
rms | Root mean square error between the original data and the fitted curve |
rSquared | R-squared error between the original data and the fitted curve |
significantDigits | Number of significant digits to be used to determine when determinants are too small |
Definition at line 111 of file FittingStatistics.cpp.
120 qApp->setOverrideCursor (Qt::WaitCursor);
125 int orderReduced = qMin (qFloor (order),
126 pointsConvenient.size() - 1);
128 calculateCurveFit (orderReduced,
132 calculateStatistics (pointsConvenient,
138 qApp->restoreOverrideCursor();
◆ TestFitting
The documentation for this class was generated from the following files: