Skip to content

Commit c926f56

Browse files
committed
Add inner cv and hp optimization to test suite
1 parent a627083 commit c926f56

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tests/test_cpm_regression.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,19 @@
99
from cpm.edge_selection import UnivariateEdgeSelection, PThreshold
1010
from cpm.cpm_analysis import CPMRegression
1111
from cpm.utils import check_data
12-
from sklearn.model_selection import KFold
12+
from sklearn.model_selection import KFold, ShuffleSplit
1313

1414

1515
class TestCPMRegression(unittest.TestCase):
1616
def setUp(self):
1717
super(TestCPMRegression, self).setUp()
1818
univariate_edge_selection = UnivariateEdgeSelection(edge_statistic='pearson',
19-
edge_selection=[PThreshold(threshold=[0.05],
19+
edge_selection=[PThreshold(threshold=[0.01, 0.05],
2020
correction=[None])])
2121
# setup an instance of CPMRegression just to initialize the logger instance
2222
self.cpm = CPMRegression(results_directory='./tmp',
2323
cv=KFold(n_splits=10, shuffle=True, random_state=42),
24+
inner_cv=ShuffleSplit(n_splits=1, random_state=42),
2425
edge_selection=univariate_edge_selection,
2526
n_permutations=2,
2627
impute_missing_values=True)

0 commit comments

Comments
 (0)