/src/main/java/net/finmath/optimizer/StochasticPathwiseLevenbergMarquardt.java
valueCurrent[valueIndex] = isPointAccepted.choose( valueTest[valueIndex], parametersNew[valueIndex]) ;
valueCurrent[valueIndex] = isPointAccepted.choose ( valueTest[valueIndex], valueCurrent[valueIndex] ) ;
final RandomVariable errorMeanSquaredTest = getMeanSquaredError(valueTest); 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++) { <extra_id_0> } errorRootMeanSquaredChange = isPointAccepted.choose(errorMeanSquaredCurrent.sqrt().sub(errorMeanSquaredTest.sqrt()), errorRootMeanSquaredChange); errorMeanSquaredCurrent = errorMeanSquaredTest.cap(errorMeanSquaredCurrent); if (done()) { break; }