interface of fitting method and implementation of common functions More...
#include <fit.h>

Public Member Functions | |
| Fit (Ftk *F, const std::string &m) | |
| void | fit (int max_iter, const std::vector< DataAndModel * > &dms) |
| initialize and run fitting procedure for not more than max_iter iterations | |
| void | continue_fit (int max_iter) |
| run fitting procedure (without initialization) | |
| bool | is_initialized () const |
| bool | is_initialized (const std::vector< DataAndModel * > &dms) const |
| std::string | get_goodness_info (const std::vector< DataAndModel * > &dms) |
| int | get_dof (const std::vector< DataAndModel * > &dms) |
| dof = degrees of freedom = (number of points - number of parameters) | |
| std::string | get_cov_info (const std::vector< DataAndModel * > &dms) |
| std::vector< realt > | get_covariance_matrix (const std::vector< DataAndModel * > &dms) |
| std::vector< realt > | get_standard_errors (const std::vector< DataAndModel * > &dms) |
| std::vector< realt > | get_confidence_limits (const std::vector< DataAndModel * > &dms, double level_percent) |
| realt | do_compute_wssr (const std::vector< realt > &A, const std::vector< DataAndModel * > &dms, bool weigthed) |
| void | Jordan (std::vector< realt > &A, std::vector< realt > &b, int n) |
| void | reverse_matrix (std::vector< realt > &A, int n) |
| A - matrix n x n; returns A^(-1) in A. | |
| std::string | print_matrix (const std::vector< realt > &vec, int m, int n, const char *mname) |
| realt | compute_r_squared (const std::vector< realt > &A, const std::vector< DataAndModel * > &dms) |
| bool | is_param_used (int n) const |
Static Public Member Functions | |
| static realt | compute_wssr_for_data (const DataAndModel *dm, bool weigthed) |
| static realt | compute_r_squared_for_data (const DataAndModel *dm, realt *sum_err, realt *sum_tot) |
Public Attributes | |
| const std::string | name |
Protected Member Functions | |
| virtual void | init ()=0 |
| number of fitted parameters | |
| virtual void | autoiter ()=0 |
| bool | common_termination_criteria (int iter) |
| checks termination criteria common for all fitting methods | |
| void | compute_derivatives (const std::vector< realt > &A, const std::vector< DataAndModel * > &dms, std::vector< realt > &alpha, std::vector< realt > &beta) |
| realt | compute_wssr (const std::vector< realt > &A, const std::vector< DataAndModel * > &dms, bool weigthed=true) |
| bool | post_fit (const std::vector< realt > &aa, realt chi2) |
| realt | draw_a_from_distribution (int nr, char distribution= 'u', realt mult=1.) |
| void | iteration_plot (const std::vector< realt > &A, realt wssr) |
Protected Attributes | |
| Ftk * | F_ |
| std::vector< DataAndModel * > | dmdm_ |
| int | evaluations_ |
| int | max_iterations_ |
| int | iter_nr_ |
| realt | wssr_before_ |
| std::vector< realt > | a_orig_ |
| std::vector< bool > | par_usage_ |
| int | na_ |
interface of fitting method and implementation of common functions
Definition at line 18 of file fit.h.
| void Fit::Jordan | ( | std::vector< realt > & | A, | |
| std::vector< realt > & | b, | |||
| int | n | |||
| ) |
This function solves a set of linear algebraic equations using Jordan elimination with partial pivoting.
A * x = b
A is n x n matrix, realt A[n*n] b is vector b[n], Function returns vector x[] in b[], and 1-matrix in A[]. return value: true=OK, false=singular matrix with special exception: if i'th row, i'th column and i'th element in b all contains zeros, it's just ignored,
Definition at line 488 of file fit.cpp.
References Ftk::msg(), and Ftk::vmsg().
Referenced by reverse_matrix().