model.getModelFunction(), model.getModelFunctionJacobian(), new Target(target), new Weight(weights), new InitialGuess(initialGuess));
target = ((Target) data).getTarget(); continue;
model.getModelFunction(), model.getModelFunctionJacobian(), new Target(target), new Weight(weights), new InitialGuess(initialGuess));
target = ((Target) data).getTarget(); continue;
model.getModelFunction(), model.getModelFunctionJacobian(), new Target(target), new Weight(weights), new InitialGuess(initialGuess));
target = ((Target) data).getTarget(); continue;
protected Molecule fit(ILsqFunctions functions) { // init double[] weights = functions.calcWeights(useWeighting); double[] observations = functions.getObservations(); // fit LevenbergMarquardtOptimizer optimizer = new LevenbergMarquardtOptimizer( new SimplePointChecker<PointVectorValuePair>(10e-10, 10e-10, maxIter)); PointVectorValuePair pv; pv = optimizer.optimize( MaxEval.unlimited(), new MaxIter(MAX_ITERATIONS + 1), new ModelFunction(functions.getValueFunction()), new ModelFunctionJacobian(functions.getJacobianFunction()), new Target(observations), new InitialGuess(psfModel.transformParametersInverse(functions.getInitialParams())), new Weight(weights)); // estimate background and return an instance of the `Molecule` fittedParameters = pv.getPointRef(); if (bkgStdColumn >= 0) { fittedParameters[bkgStdColumn] = VectorMath.stddev(sub(observations, functions.getValueFunction().value(fittedParameters))); } return psfModel.newInstanceFromParams(psfModel.transformParameters(fittedParameters), functions.getImageUnits(), true); } }