diff --git a/src/shogun/machine/gp/MultiLaplacianInferenceMethod.cpp b/src/shogun/machine/gp/MultiLaplacianInferenceMethod.cpp index feccaecf2ee..be1e76a69f9 100644 --- a/src/shogun/machine/gp/MultiLaplacianInferenceMethod.cpp +++ b/src/shogun/machine/gp/MultiLaplacianInferenceMethod.cpp @@ -363,7 +363,9 @@ void CMultiLaplacianInferenceMethod::update_alpha() } if (Psi_Old-Psi_New>m_tolerance && iter>=m_iter) - SG_WARNING("Max iterations attained but the optimizer is not converged\n"); + { + SG_WARNING("Max iterations (%d) reached, but convergence level (%f) is not yet below tolerance (%f)\n", m_iter, Psi_Old-Psi_New, m_tolerance); + } } void CMultiLaplacianInferenceMethod::update_deriv() diff --git a/src/shogun/machine/gp/SingleFITCLaplacianInferenceMethod.cpp b/src/shogun/machine/gp/SingleFITCLaplacianInferenceMethod.cpp index 5eb5be74c18..05a22908f6d 100644 --- a/src/shogun/machine/gp/SingleFITCLaplacianInferenceMethod.cpp +++ b/src/shogun/machine/gp/SingleFITCLaplacianInferenceMethod.cpp @@ -425,8 +425,11 @@ void CSingleFITCLaplacianInferenceMethod::update_alpha() float64_t x; Psi_New=local_min(0, m_opt_max, m_opt_tolerance, func, x); } + if (Psi_Old-Psi_New>m_tolerance && iter>=m_iter) - SG_WARNING("Max iterations attained but the optimizer is not converged\n"); + { + SG_WARNING("Max iterations (%d) reached, but convergence level (%f) is not yet below tolerance (%f)\n", m_iter, Psi_Old-Psi_New, m_tolerance); + } // compute f = K * alpha + m SGVector tmp=compute_mvmK(m_al); diff --git a/src/shogun/machine/gp/SingleLaplacianInferenceMethod.cpp b/src/shogun/machine/gp/SingleLaplacianInferenceMethod.cpp index 269769dca96..d3e0f9b4b62 100644 --- a/src/shogun/machine/gp/SingleLaplacianInferenceMethod.cpp +++ b/src/shogun/machine/gp/SingleLaplacianInferenceMethod.cpp @@ -382,8 +382,11 @@ void CSingleLaplacianInferenceMethod::update_alpha() float64_t x; Psi_New=local_min(0, m_opt_max, m_opt_tolerance, func, x); } + if (Psi_Old-Psi_New>m_tolerance && iter>=m_iter) - SG_WARNING("Max iterations attained but the optimizer is not converged\n"); + { + SG_WARNING("Max iterations (%d) reached, but convergence level (%f) is not yet below tolerance (%f)\n", m_iter, Psi_Old-Psi_New, m_tolerance); + } // compute f = K * alpha + m eigen_mu=eigen_ktrtr*CMath::sq(m_scale)*eigen_alpha+eigen_mean;