ComPWA
Common Partial-Wave-Analysis Framework
GoodnessOfFit.hpp
Go to the documentation of this file.
1 #ifndef COMPWA_TOOLS_GOF_HPP_
2 #define COMPWA_TOOLS_GOF_HPP_
3 
4 #include <cmath>
5 
11 inline double calculateAIC(double LH, int sampleSize, int nFreePar) {
12  // Classic AIC
13  double aic = 2.0 * LH + 2.0 * nFreePar;
14  // AICc is a modified version which includes the sample size
15  aic += 2.0 * (nFreePar * nFreePar + nFreePar) / (sampleSize - nFreePar - 1);
16  return aic;
17 }
18 
24 inline double calculateBIC(double LH, int sampleSize, int nFreePar) {
25  return std::log(sampleSize) * nFreePar + 2.0 * LH;
26 }
27 #endif
double calculateBIC(double LH, int sampleSize, int nFreePar)
Calculate Beyesian Information Criterium BIC https://en.wikipedia.org/wiki/Bayesian_information_crite...
double calculateAIC(double LH, int sampleSize, int nFreePar)
Calculate Akaike Information Criterium AICc https://en.wikipedia.org/wiki/Akaike_information_criterio...