Checks if a range of observations have converged.
Definition at line 79 of file MCData.hh.
CASM::Monte::MCDataConvergence::MCDataConvergence |
( |
const Eigen::VectorXd & |
observations, |
|
|
double |
conf |
|
) |
| |
Construct a MCDataConvergence object.
Check convergence of a range of observations.
- Parameters
-
observations | An Eigen::VectorXd of observations |
conf | Desired confidence level |
We check for convergence using the algorithm of: Van de Walle and Asta, Modelling Simul. Mater. Sci. Eng. 10 (2002) 521–538.
The observations are considered converged to the desired prec and conf if:
where:
- calculated_prec = sqrt(Var)*z_alpha,
- z_alpha = sqrt(2.0)*inv_erf(1.0-conf)
- var_of_mean = (CoVar[0]/observations.size())*((1.0+rho)/(1.0-rho))
- CoVar[i] = ( (1.0/(observations.size()-i))*sum_j(j=0:L-i-1, observations(j)*observations(j+1)) ) - sqr(observations.mean());
- rho = pow(2.0, -1.0/i), using min i such that CoVar[i]/CoVar[0] < 0.5
Definition at line 132 of file MCData.cc.