Skip to content

Commit 5c4a3c3

Browse files
src/radmeth/radmeth_optimize.cpp: not throwing an exception when the iterative estimation fails to converge; there are ok reasons for not converging
1 parent 5d7fef9 commit 5c4a3c3

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

src/radmeth/radmeth_optimize.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,8 +279,12 @@ fit_regression_model(Regression &r, std::vector<double> &p_estimates,
279279
// check status from gradient
280280
status = gsl_multimin_test_gradient(s->gradient, tol);
281281
} while (status == GSL_CONTINUE && ++iter < max_iter);
282-
if (status != GSL_SUCCESS)
283-
throw std::runtime_error("failed to fit model parameters");
282+
283+
/// ADS: the condition below might not always pass even if we are doing
284+
/// ok. It's not clear how to check for failure.
285+
286+
// if (status != GSL_SUCCESS)
287+
// throw std::runtime_error("failed to fit model parameters");
284288

285289
const auto param_estimates = gsl_multimin_fdfminimizer_x(s);
286290

0 commit comments

Comments
 (0)