Search in sources :

Example 1 with WPoissonGradientProcedure

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);
}
Also used : FisherInformationMatrix(uk.ac.sussex.gdsc.smlm.fitting.FisherInformationMatrix) WPoissonGradientProcedure(uk.ac.sussex.gdsc.smlm.fitting.nonlinear.gradient.WPoissonGradientProcedure)

Aggregations

FisherInformationMatrix (uk.ac.sussex.gdsc.smlm.fitting.FisherInformationMatrix)1 WPoissonGradientProcedure (uk.ac.sussex.gdsc.smlm.fitting.nonlinear.gradient.WPoissonGradientProcedure)1