From 8c4678c7cc140054478e23aabba9e5fe380de67f Mon Sep 17 00:00:00 2001
From: Farid Mohammadi <farid.mohammadi@iws.uni-stuttgart.de>
Date: Mon, 26 Sep 2022 17:43:49 +0200
Subject: [PATCH] [surrogate] update tqdm progress bar message for normal PCE.

---
 src/bayesvalidrox/surrogate_models/surrogate_models.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/bayesvalidrox/surrogate_models/surrogate_models.py b/src/bayesvalidrox/surrogate_models/surrogate_models.py
index 341ecf566..c66962775 100644
--- a/src/bayesvalidrox/surrogate_models/surrogate_models.py
+++ b/src/bayesvalidrox/surrogate_models/surrogate_models.py
@@ -236,7 +236,7 @@ class MetaModel():
             fast_bootstrap = False
 
         # Prepare tqdm iteration maessage
-        if self.n_bootstrap_itrs > 1:
+        if verbose and self.n_bootstrap_itrs > 1:
             enum_obj = tqdm(range(self.n_bootstrap_itrs),
                             total=self.n_bootstrap_itrs,
                             desc="Boostraping the metamodel",
@@ -317,6 +317,7 @@ class MetaModel():
                                        range(target.shape[1])],
                                       range(target.shape[1]))
                         out = list(results)
+
                     # Store the first out dictionary
                     if fast_bootstrap and b_i == 0:
                         first_out[key] = copy.deepcopy(out)
@@ -1484,7 +1485,8 @@ class MetaModel():
         else:
             d = nitr if nitr != 0 and self.n_params > 5 else 1
             min_index = np.argmin(abs(M_uptoMax(max_deg)-ndim*n_samples*d))
-            deg_new = max_deg#range(1, max_deg+1)[min_index]
+            deg_new = max_deg
+            # deg_new = range(1, max_deg+1)[min_index]
 
         if deg_new > min_Deg and self.pce_reg_method.lower() != 'fastard':
             deg_array = np.arange(min_Deg, deg_new+1)
-- 
GitLab