File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
src/main/java/net/finmath/optimizer Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -757,7 +757,7 @@ private void updateParameterTest() throws SolverException {
757
757
* where H = J^T J is the Hessian approximation and b = J^T (y-f(x)) and \Delta x is the parameterIncrement
758
758
*/
759
759
boolean hessianInvalid = true ;
760
- while (hessianInvalid ) {
760
+ while (hessianInvalid && Double . isFinite ( lambda ) ) {
761
761
hessianInvalid = false ;
762
762
// Build matrix H (Hessian approximation), that is H = J^T J
763
763
for (int i = 0 ; i < parameterCurrent .length ; i ++) {
@@ -800,7 +800,8 @@ private void updateParameterTest() throws SolverException {
800
800
801
801
try {
802
802
// Calculate new increment
803
- parameterIncrement = LinearAlgebra .solveLinearEquationSymmetric (hessianMatrix , beta );
803
+ // parameterIncrement = LinearAlgebra.solveLinearEquationSymmetric(hessianMatrix, beta);
804
+ parameterIncrement = LinearAlgebra .solveLinearEquationSVD (hessianMatrix , beta );
804
805
} catch (final Exception e ) {
805
806
// Matrix not invertable, increase lambda
806
807
hessianInvalid = true ;
You can’t perform that action at this time.
0 commit comments