public class NonlinearFit extends Object
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.Modifier and Type | Class and Description |
---|---|
static class |
NonlinearFit.Result |
Constructor and Description |
---|
NonlinearFit() |
Modifier and Type | Method and Description |
---|---|
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).
|
static double[] |
computeWeights(double[] epsilon,
double[] confint)
Compute weights from epsilon values and their corresponding confidence interval half-width.
|
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.
|
NonlinearFit.Result |
fit(EmpiricalACER estimates,
double tailMarker)
Fit ACER function with empirical ACER estimates.
|
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.
|
NonlinearFit.Result |
fitWithWeightsAndInitial(double[] eta,
double[] epsilon,
double[] weights,
ACERFunction.ACERParameter initial,
double minLevel,
double tailMarker) |
public NonlinearFit.Result fit(EmpiricalACER estimates, double tailMarker)
estimates
- the empirical ACER estimatestailMarker
- the tail markerpublic NonlinearFit.Result fit(double[] eta, double[] epsilon, double[] confWidth, double peakMean, double tailMarker)
eta
- the barrier levelsepsilon
- the ACER valuesconfWidth
- the confidence interval half-widths for the ACER valuespeakMean
- the mean of the events (or peaks)tailMarker
- the tail markerpublic NonlinearFit.Result fitWithWeights(double[] eta, double[] epsilon, double[] weights, double peakMean, double minLevel, double tailMarker)
eta
- the barrier levelsepsilon
- 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 leveltailMarker
- the tail markerpublic NonlinearFit.Result fitWithWeightsAndInitial(double[] eta, double[] epsilon, double[] weights, ACERFunction.ACERParameter initial, double minLevel, double tailMarker)
public static double[] computeWeights(double[] epsilon, double[] confint)
epsilon
- the epsilon valuesconfint
- the confidence interval half-widthpublic static double computeWeightedRSS(ACERFunction.ACERParameter param, double[] barrierLevels, double[] epsilons, double[] weights)
param
- the estimated parameter for ACER functionbarrierLevels
- the barrier levelsepsilons
- the (positive) empirical epsilons for the corresponding barrier levelsweights
- the weights for the corresponding epsilonCopyright © 2010-2020 NM FinTech Ltd.. All Rights Reserved.