From f3328932fe46d2dc5aed69c537dfb04cf4f41088 Mon Sep 17 00:00:00 2001 From: Farid Mohammadi <farid.mohammadi@iws.uni-stuttgart.de> Date: Mon, 12 Sep 2022 09:19:41 +0200 Subject: [PATCH] [surrogate][omp] fix bugs. --- .../surrogate_models/orthogonal_matching_pursuit.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/bayesvalidrox/surrogate_models/orthogonal_matching_pursuit.py b/src/bayesvalidrox/surrogate_models/orthogonal_matching_pursuit.py index 64b7f102e..d4f99b8a1 100644 --- a/src/bayesvalidrox/surrogate_models/orthogonal_matching_pursuit.py +++ b/src/bayesvalidrox/surrogate_models/orthogonal_matching_pursuit.py @@ -195,8 +195,9 @@ class OrthogonalMatchingPursuit(LinearModel, RegressorMixin): r = R / norm_R # Update counters and early-stop criterions - countinf = max(0, round(count-k*kmax)) + countinf = max(0, int(count-k*kmax)) LOOmin = min(LOOmin, LOO[count]) + if count == 0: cond_early = (LOO[0] <= LOOmin) else: -- GitLab