# SuanShu, a Java numerical and statistical library

com.numericalmethod.suanshu.stats.evt.evd.univariate.fitting.acer

## Class LinearFit

• java.lang.Object
• com.numericalmethod.suanshu.stats.evt.evd.univariate.fitting.acer.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 Summary

Constructors
Constructor and Description
LinearFit()
Create an instance with the assumption of c = 2.
LinearFit(double c)
This fitting assumes c is a constant.
• ### Method Summary

All Methods
Modifier and Type Method and Description
ACERFunction.ACERParameter fit(double[] eta, double[] epsilon, double peakMean)
Fit the ACER function with OLS.
• ### Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
• ### 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