Skip to content

Commit

Permalink
Decreased time consumption of some tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ole-Christian Galbo Engstrøm committed Jan 22, 2025
1 parent 216611a commit 1dea235
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tests/test_ikpls.py
Original file line number Diff line number Diff line change
Expand Up @@ -4015,6 +4015,10 @@ def test_center_scale_combinations_pls_1(self):
X = X[..., :10] # Decrease the amount of features in the interest of time.
Y = self.load_Y(["Protein"])
splits = self.load_Y(["split"]) # Contains 3 splits of different sizes
# Decrease the amount of samples in the interest of time.
X = X[::50]
Y = Y[::50]
splits = splits[::50]
assert Y.shape[1] == 1
self.check_center_scale_combinations(X, Y, splits, atol=0, rtol=1e-8)

Expand Down Expand Up @@ -4064,6 +4068,10 @@ def test_center_scale_combinations_pls_2_m_less_k(self):
]
)
splits = self.load_Y(["split"]) # Contains 3 splits of different sizes
# Decrease the amount of samples in the interest of time.
X = X[::50]
Y = Y[::50]
splits = splits[::50]
assert Y.shape[1] > 1
assert Y.shape[1] < X.shape[1]
self.check_center_scale_combinations(X, Y, splits, atol=0, rtol=1e-7)
Expand Down Expand Up @@ -4109,6 +4117,10 @@ def test_center_scale_combinations_pls_2_m_eq_k(self):
)
X = X[..., :10]
splits = self.load_Y(["split"]) # Contains 3 splits of different sizes
# Decrease the amount of samples in the interest of time.
X = X[::50]
Y = Y[::50]
splits = splits[::50]
assert Y.shape[1] > 1
assert Y.shape[1] == X.shape[1]
self.check_center_scale_combinations(X, Y, splits, atol=0, rtol=3e-8)
Expand Down Expand Up @@ -4154,6 +4166,10 @@ def test_center_scale_combinations_pls_2_m_greater_k(self):
)
X = X[..., :9]
splits = self.load_Y(["split"]) # Contains 3 splits of different sizes
# Decrease the amount of samples in the interest of time.
X = X[::50]
Y = Y[::50]
splits = splits[::50]
assert Y.shape[1] > 1
assert Y.shape[1] > X.shape[1]
self.check_center_scale_combinations(X, Y, splits, atol=0, rtol=1e-8)

0 comments on commit 1dea235

Please sign in to comment.