Class fit_linear (o2scl)¶
-
template<class
vec_t
= boost::numeric::ublas::vector<double>, classmat_t
= boost::numeric::ublas::matrix<double>>
classo2scl
::
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()
-
fit_linear
()¶
-
~fit_linear
()¶
-
void
fit_svd
(size_t ndat, size_t npar)¶ Perform the SV decomposition.
-
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
.
-
const char *
type
()¶ Return string denoting type (“fit_linear”)
-
size_t