Esempio n. 1
0
    // similar to gsr model, see the documentation there
    void calibrateAlphasIterative(
        const std::vector<boost::shared_ptr<CalibrationHelper> > &helpers,
        OptimizationMethod &method, const EndCriteria &endCriteria,
        const Constraint &constraint = Constraint(),
        const std::vector<Real> &weights = std::vector<Real>()) {

        for (Size i = 0; i < helpers.size(); i++) {
            std::vector<boost::shared_ptr<CalibrationHelper> > h(1, helpers[i]);
            calibrate(h, method, endCriteria, constraint, weights,
                      MoveAlpha(i));
        }
    }
Esempio n. 2
0
double DGamRateProcess::NonMPIMoveRateParams(double tuning, int nrep)	{

	UpdateRateSuffStat();
	double naccepted = 0;
	for (int rep=0; rep<nrep; rep++)	{
		naccepted += MoveAlpha(tuning);
		if (withpinv)	{
			naccepted += MovePinv(tuning);
		}
	}
	return naccepted / nrep;
}