Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tests/test_kernel_pcovr.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def __init__(self, *args, **kwargs):
self.X, self.Y = get_dataset(return_X_y=True)

# for the sake of expedience, only use a subset of the dataset
idx = self.random_state.choice(len(self.X), 1000)
idx = self.random_state.choice(len(self.X), 100)
self.X = self.X[idx]
self.Y = self.Y[idx]

Expand Down
7 changes: 4 additions & 3 deletions tests/test_sample_pcov_cur.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
class TestPCovCUR(unittest.TestCase):
def setUp(self):
self.X, self.y = get_dataset(return_X_y=True)
self.idx = [256, 304, 58, 10, 23, 278, 230, 285, 291, 357]
self.X = self.X[:, :4]
self.idx = [256, 304, 41, 408, 311, 364, 152, 78, 359, 102]

def test_known(self):
"""
Expand Down Expand Up @@ -51,7 +52,7 @@ def test_non_it(self):
"""
This test checks that the model can be run non-iteratively
"""
self.idx = [256, 32, 138, 290, 362, 141, 359, 254, 428, 9]
self.idx = [256, 32, 138, 290, 362, 141, 359, 428, 254, 9]
selector = PCovCUR(n_to_select=10, recompute_every=0)
selector.fit(self.X, self.y)

Expand All @@ -62,7 +63,7 @@ def test_multiple_k(self):
This test checks that the model can be run with multiple k's
"""

for k in np.logspace(0, np.log10(self.X.shape[0]), 4, dtype=int):
for k in list(set(np.logspace(0, np.log10(min(self.X.shape)), 4, dtype=int))):
selector = PCovCUR(n_to_select=10, k=k)
selector.fit(self.X, self.y)

Expand Down