ReFRACtor
|
This class holds various parameters describing how good of a fit we have. More...
#include <convergence_check.h>
Public Types | |
enum | OUTCOME { NOT_SET = 0, CONVERGE_ALL_BAND_OK = 1, CONVERGE_NOT_ALL_BAND_OK = 2, EXCEED_MAX_ITERATION = 3, EXCEED_MAX_DIVERGENT = 4 } |
Public Member Functions | |
FitStatistic () | |
Default constructor. More... | |
FitStatistic (bool Fit_succeeded, OUTCOME Outcome, int Number_iteration, int Number_divergent, double D_sigma_sq, double D_sigma_sq_scaled, double Chisq_apriori, double Chisq_measured, double Chisq_apriori_fc, double Chisq_measured_fc) | |
double | chisq_measure_norm (const blitz::Array< double, 1 > &Residual, const blitz::Array< double, 1 > &Residual_cov_diag) const |
Calculate chisq for given residual and covariance matrix. More... | |
void | from_stream (std::istream &is) |
Load data from a stream. More... | |
double | gamma2 () const |
Parameter "gamma2", which is just chi2_apriori + chi2_measured. More... | |
double | gamma2_fc () const |
Parameter "gamma2_fc", which is just chisq_apriori_fc + chisq_measured_fc. More... | |
void | print (std::ostream &Os) const |
Print to a stream. More... | |
std::string | print_to_string () const |
Print to string. More... | |
double | residual_abs_rms (const blitz::Array< double, 1 > &Residual) const |
Calculate absolute root mean squared for given residual. More... | |
double | residual_rel_rms (const blitz::Array< double, 1 > &Residual, const blitz::Array< double, 1 > &Rad_measure) const |
Calculate relative root mean squared for given residual. More... | |
void | to_stream (std::ostream &os) const |
Dump data to a stream. More... | |
Public Attributes | |
double | chisq_apriori |
Chisq of the X_i vs. the apriori X value. More... | |
double | chisq_apriori_fc |
Chisq of the X_i vs. More... | |
double | chisq_measured |
Chisq of the residuals of the measurement vs. model prediction. More... | |
double | chisq_measured_fc |
Chisq of the residuals of the measurement vs. More... | |
double | d_sigma_sq |
This is d_sigma_sq, which is the product of the correction to the state vector and the right hand size of the equation fit. More... | |
double | d_sigma_sq_scaled |
This is d_sigma_sq, scaled by the size of the state vector. More... | |
bool | fit_succeeded |
Was the fit successful? More... | |
int | number_divergent |
Number of divergent steps. More... | |
int | number_iteration |
Number of iterations. More... | |
OUTCOME | outcome |
Flag indicating success of fit, or why fit wasn't succesful. More... | |
This class holds various parameters describing how good of a fit we have.
This is pretty much just a structure to collect various statistics in one place.
Definition at line 12 of file convergence_check.h.
Enumerator | |
---|---|
NOT_SET | |
CONVERGE_ALL_BAND_OK | |
CONVERGE_NOT_ALL_BAND_OK | |
EXCEED_MAX_ITERATION | |
EXCEED_MAX_DIVERGENT |
Definition at line 14 of file convergence_check.h.
|
inline |
Default constructor.
Definition at line 21 of file convergence_check.h.
|
inline |
Definition at line 28 of file convergence_check.h.
|
inline |
Calculate chisq for given residual and covariance matrix.
Definition at line 150 of file convergence_check.h.
|
inline |
Load data from a stream.
Definition at line 59 of file convergence_check.h.
|
inline |
Parameter "gamma2", which is just chi2_apriori + chi2_measured.
Definition at line 111 of file convergence_check.h.
|
inline |
Parameter "gamma2_fc", which is just chisq_apriori_fc + chisq_measured_fc.
Definition at line 117 of file convergence_check.h.
void FitStatistic::print | ( | std::ostream & | Os | ) | const |
Print to a stream.
Definition at line 15 of file convergence_check.cc.
|
inlineinherited |
Print to string.
This is primarily useful for SWIG wrappers to this class, e.g. a to_s method in ruby.
Definition at line 31 of file printable.h.
|
inline |
Calculate absolute root mean squared for given residual.
Definition at line 158 of file convergence_check.h.
|
inline |
Calculate relative root mean squared for given residual.
Definition at line 165 of file convergence_check.h.
|
inline |
Dump data to a stream.
Definition at line 45 of file convergence_check.h.
double FullPhysics::FitStatistic::chisq_apriori |
Chisq of the X_i vs. the apriori X value.
Definition at line 123 of file convergence_check.h.
double FullPhysics::FitStatistic::chisq_apriori_fc |
Chisq of the X_i vs.
the apriori X value forcasted using a linear approximation to the cost function.
Definition at line 136 of file convergence_check.h.
double FullPhysics::FitStatistic::chisq_measured |
Chisq of the residuals of the measurement vs. model prediction.
Definition at line 129 of file convergence_check.h.
double FullPhysics::FitStatistic::chisq_measured_fc |
Chisq of the residuals of the measurement vs.
model prediction forcasted using a linear approximation to the cost function.
Definition at line 143 of file convergence_check.h.
double FullPhysics::FitStatistic::d_sigma_sq |
This is d_sigma_sq, which is the product of the correction to the state vector and the right hand size of the equation fit.
Definition at line 99 of file convergence_check.h.
double FullPhysics::FitStatistic::d_sigma_sq_scaled |
This is d_sigma_sq, scaled by the size of the state vector.
Definition at line 105 of file convergence_check.h.
bool FullPhysics::FitStatistic::fit_succeeded |
Was the fit successful?
Definition at line 74 of file convergence_check.h.
int FullPhysics::FitStatistic::number_divergent |
Number of divergent steps.
Definition at line 92 of file convergence_check.h.
int FullPhysics::FitStatistic::number_iteration |
Number of iterations.
Definition at line 86 of file convergence_check.h.
OUTCOME FullPhysics::FitStatistic::outcome |
Flag indicating success of fit, or why fit wasn't succesful.
Definition at line 80 of file convergence_check.h.