Class fit_linear (o2scl)¶
-
template<class vec_t = boost::numeric::ublas::vector<double>, class mat_t = boost::numeric::ublas::matrix<double>>
class fit_linear¶ Linear least-squares fitting class (GSL)
Storage
-
size_t size_par¶
Number of parameters.
-
size_t size_dat¶
Number of data points.
-
bool column_scaling¶
If true, discard fit components if the associated singular value becomes too small (default true)
-
double tol¶
Tolerance (default \( \sim 2.22\times 10^{-16} \))
-
size_t rank¶
The rank of the linear system from the last call to
fit_linear()
-
inline fit_linear()¶
-
inline virtual ~fit_linear()¶
-
inline virtual void fit_svd(size_t ndat, size_t npar)¶
Perform the SV decomposition.
-
inline virtual void fit(size_t npar, size_t ndat, const vec_t &ydat, const mat_t &xpred, vec_t &parms, mat_t &covar, double &chi2)¶
Perform a least-squares fit of a linear system.
This function performs a least-squares fit of the system
\[ \mathrm{xpred} \cdot \mathrm{parms} = \mathrm{ydat} \]The variance-covariance matrix for the parameters is returned in
covar
and the value of \( \chi^2 \) is returned inchi2
.
-
inline virtual const char *type()¶
Return string denoting type (“fit_linear”)
-
size_t size_par¶