Class NonlinearFit


  • public class NonlinearFit
    extends Object
    Fit log-ACER function by sequential quadratic programming (SQP) minimization (of weighted RSS), using LinearFit's solution as the initial guess. The weights are computed as: \[ w_i = \frac{1}{(\log CI^+(\eta_i) - \log CI^-(\eta_i))^2} \] These weights measure the reciprocals of variances and are used to put less emphasis on the more uncertain values for the ACER function.
    • Constructor Detail

      • NonlinearFit

        public NonlinearFit()
    • Method Detail

      • fit

        public NonlinearFit.Result fit​(EmpiricalACER estimates,
                                       double tailMarker)
        Fit ACER function with empirical ACER estimates. Weights are computed from the confidence intervals of the estimates.
        Parameters:
        estimates - the empirical ACER estimates
        tailMarker - the tail marker
        Returns:
        the fitted ACER parameters
      • fit

        public NonlinearFit.Result fit​(double[] eta,
                                       double[] epsilon,
                                       double[] confWidth,
                                       double peakMean,
                                       double tailMarker)
        Fit the ACER function with the input values of barrier levels, epsilons, confidence intervals, and the mean of the peaks. Weights are computed from the input confidence intervals.
        Parameters:
        eta - the barrier levels
        epsilon - the ACER values
        confWidth - the confidence interval half-widths for the ACER values
        peakMean - the mean of the events (or peaks)
        tailMarker - the tail marker
        Returns:
        the fitted ACER parameters
      • fitWithWeights

        public NonlinearFit.Result fitWithWeights​(double[] eta,
                                                  double[] epsilon,
                                                  double[] weights,
                                                  double peakMean,
                                                  double minLevel,
                                                  double tailMarker)
        Fit the ACER function with the input values of barrier levels, epsilons, confidence intervals, and the mean of the peaks. Weights
        Parameters:
        eta - the barrier levels
        epsilon - the ACER values (assume all positive as ACER represents a probability)
        weights - the weighting for the ACER values (put more emphasis on more confident values)
        peakMean - the mean of the events (or peaks)
        minLevel - the minimum barrier level
        tailMarker - the tail marker
        Returns:
        the fitted ACER parameters
      • computeWeights

        public static double[] computeWeights​(double[] epsilon,
                                              double[] confint)
        Compute weights from epsilon values and their corresponding confidence interval half-width.
        Parameters:
        epsilon - the epsilon values
        confint - the confidence interval half-width
        Returns:
        the computed weights
      • computeWeightedRSS

        public static double computeWeightedRSS​(ACERFunction.ACERParameter param,
                                                double[] barrierLevels,
                                                double[] epsilons,
                                                double[] weights)
        Measure how fit the estimated log-ACER function to the empirical epsilons by weighted sum of squared residuals (RSS).
        Parameters:
        param - the estimated parameter for ACER function
        barrierLevels - the barrier levels
        epsilons - the (positive) empirical epsilons for the corresponding barrier levels
        weights - the weights for the corresponding epsilon
        Returns:
        the computed weighted RSS