use of uk.ac.sussex.gdsc.smlm.fitting.nonlinear.gradient.WPoissonGradientProcedure in project GDSC-SMLM by aherbert.
the class WLseLvmSteppingFunctionSolver method computeFunctionFisherInformationMatrix.
@Override
protected FisherInformationMatrix computeFunctionFisherInformationMatrix(double[] y, double[] a) {
// Compute using the scaled Hessian as per the above method.
// Use a dedicated procedure that omits computing beta.
final WPoissonGradientProcedure p = WPoissonGradientProcedureUtils.create(y, getWeights(y.length), (Gradient1Function) function);
p.computeFisherInformation(a);
if (p.isNaNGradients()) {
throw new FunctionSolverException(FitStatus.INVALID_GRADIENTS);
}
return new FisherInformationMatrix(p.getLinear(), p.numberOfGradients);
}
Aggregations