diff --git a/h2o-algos/src/main/java/hex/hglm/ComputationStateHGLM.java b/h2o-algos/src/main/java/hex/hglm/ComputationStateHGLM.java index 96b522bae393..e86727130cb1 100644 --- a/h2o-algos/src/main/java/hex/hglm/ComputationStateHGLM.java +++ b/h2o-algos/src/main/java/hex/hglm/ComputationStateHGLM.java @@ -79,7 +79,7 @@ void initComputationStateHGLM(HGLMTask.ComputationEngineTask engineTask) { throw new IllegalArgumentException("initial_t_matrix must be symmetric but is not!"); // make sure matrix is semi positive definite Matrix tMat = new Matrix(_T); - if (!tMat.chol().isSPD()) + if ((_parms._max_iterations > 0) && !tMat.chol().isSPD()) // only check this when we actually build the model throw new IllegalArgumentException("initial_t_matrix must be positive semi definite but is not!"); } else { if (_parms._tau_u_var_init > 0.0) {