/src/main/java/net/finmath/optimizer/StochasticPathwiseLevenbergMarquardt.java
final RandomVariable errorMeanSquaredTest = getMeanSquaredError ( valueTest ) ;
Arrays.fill(valueCurrent, new RandomVariableFromDoubleArray(Double.NaN)); derivativeCurrent = new RandomVariable[numberOfParameters][numberOfValues]; iteration = 0; while(true) { iteration++; prepareAndSetValues(parameterTest, valueTest); <extra_id_0> final RandomVariable isPointAccepted = errorMeanSquaredCurrent.sub(errorMeanSquaredTest); for(int parameterIndex = 0; parameterIndex<parameterCurrent.length; parameterIndex++) { parameterCurrent[parameterIndex] = isPointAccepted.choose(parameterTest[parameterIndex], parameterCurrent[parameterIndex]); } for(int valueIndex = 0; valueIndex<valueCurrent.length; valueIndex++) { valueCurrent[valueIndex] = isPointAccepted.choose(valueTest[valueIndex], valueCurrent[valueIndex]);