From 01130da2452713c5f0619e6a2de86dc3062d46b0 Mon Sep 17 00:00:00 2001
From: Tizian Wenzel <tizian.wenzel@uni-hamburg.de>
Date: Tue, 30 Apr 2024 13:36:29 +0200
Subject: [PATCH] Minor updates (some fixes).

---
 main_03a_func_approx_high.py | 4 +---
 utilities/kea6.py            | 4 ++--
 2 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/main_03a_func_approx_high.py b/main_03a_func_approx_high.py
index 916974c..0d2bf5a 100644
--- a/main_03a_func_approx_high.py
+++ b/main_03a_func_approx_high.py
@@ -20,7 +20,7 @@ np.random.seed(1)
 # Settings
 N_flexibility = 0
 
-list_idx_dataset = [0, 1, 2, 3, 4, 5, 7, 8, 9]
+list_idx_dataset = [4, 5]
 list_kernels = [kernels.Matern(k=k_mat, flag_normalize_x=True) for k_mat in range(5)]
 list_tkernels = [tkernels.Matern(k=k_mat, flag_normalize_x=True) for k_mat in range(5)]
 
@@ -57,8 +57,6 @@ for idx_dataset in list_idx_dataset:
         X_train, X_test = np.random.rand(10000, dim), np.random.rand(10000, dim)
         y_train, y_test = f_func(X_train), f_func(X_test)
 
-
-        X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.3, random_state=2)
     else:
         continue
 
diff --git a/utilities/kea6.py b/utilities/kea6.py
index 69a3e00..5c46879 100644
--- a/utilities/kea6.py
+++ b/utilities/kea6.py
@@ -152,7 +152,7 @@ class KEA(BaseEstimator):
         indI = list(indices_inverse[:X_ctrs.shape[0]-N_flexibility])        # remove N_flexibility additional centers
 
         # Introduce a suitable ordering into indI to save computational time later on
-        model_greedy = VKOGA_2L(kernel=self.kernel, beta=self.beta, verbose=False,
+        model_greedy = VKOGA_2L(kernel=self.kernel,  greedy_type='f_greedy', verbose=False,
                              tol_p=1e-12, tol_f=1e-12)
         _ = model_greedy.fit(X[indI, :], y[indI, :], maxIter=len(indI))
 
@@ -236,7 +236,7 @@ class KEA(BaseEstimator):
 
 
         # Add the N_flexibility many centers again
-        model_final_add = VKOGA_2L(kernel=self.kernel, beta=self.beta, verbose=False, tol_f=1e-14, tol_p=1e-14)
+        model_final_add = VKOGA_2L(kernel=self.kernel, greedy_type='f_greedy', verbose=False, tol_f=1e-14, tol_p=1e-14)
         model_final_add.fit(X[indI, :], y[indI, :], maxIter=len(indI))      # use the existing centers
         indI = [indI[idx] for idx in model_final_add.indI_]
         notIndI = [idx for idx in range(X.shape[0]) if idx not in indI]  # required because vkoga removes previously chosen points
-- 
GitLab