Class LinearFit


  • public class LinearFit
    extends Object
    Find the parameters for the ACER function from the given empirical epsilon, using OLS regression on the logarithm of the values. That is, \[ \log(\epsilon_k) = \log(q) - a (\eta - b)^c \]

    Note that there are four variables in the equation, namely, q, b, a, c. This algorithm fixes the value of b and c:

    • b: the minimum barrier levels, and at most the mean of the observed peaks
    • c: 2, or any user-specified value
    and then apply ordinary least square (OLS) regression to determine q and a.
    • Constructor Detail

      • LinearFit

        public LinearFit()
        Create an instance with the assumption of c = 2. Experiments show that this assumption is a good choice.
      • LinearFit

        public LinearFit​(double c)
        This fitting assumes c is a constant.
        Parameters:
        c - the assumed value of c
    • Method Detail

      • fit

        public ACERFunction.ACERParameter fit​(double[] eta,
                                              double[] epsilon,
                                              double peakMean)
        Fit the ACER function with OLS.

        Note: the input epsilon values must be positive (as they represent probabilities).

        Parameters:
        eta - the barrier levels
        epsilon - the empirical epsilon values
        peakMean - the mean of the observed peaks
        Returns:
        the fitted ACER parameter