File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed
Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -182,6 +182,8 @@ Each model contains:
182182 trained_model = data[ 0] [ 1 ] .output.model
183183 trained_model.predict(np.random.rand(1, 30))
184184 ```
185+ Please check the value of ` data[N][0] ` to ensure that you are not using
186+ a permuted model.
185187- One figure per metric with performance distribution across splits (with or
186188without null distribution trained on permuted labels)
187189- One figure per any metric with the word ` score ` in it reporting the results of
Original file line number Diff line number Diff line change 11import os
22from ..classifier import gen_workflow , run_workflow
3+ import numpy as np
34
45
56def test_classifier (tmpdir ):
@@ -32,6 +33,8 @@ def test_classifier(tmpdir):
3233 assert results [0 ][0 ]["ml_wf.clf_info" ][1 ] == "MLPClassifier"
3334 assert results [0 ][0 ]["ml_wf.permute" ]
3435 assert results [0 ][1 ].output .score [0 ][0 ] < results [1 ][1 ].output .score [0 ][0 ]
36+ assert hasattr (results [2 ][1 ].output .model , "predict" )
37+ assert isinstance (results [2 ][1 ].output .model .predict (np .ones ((1 , 30 ))), np .ndarray )
3538
3639
3740def test_regressor (tmpdir ):
@@ -69,3 +72,5 @@ def test_regressor(tmpdir):
6972 assert results [0 ][0 ]["ml_wf.clf_info" ][- 1 ][1 ] == "MLPRegressor"
7073 assert results [0 ][0 ]["ml_wf.permute" ]
7174 assert results [0 ][1 ].output .score [0 ][0 ] < results [1 ][1 ].output .score [0 ][0 ]
75+ assert hasattr (results [2 ][1 ].output .model , "predict" )
76+ assert isinstance (results [2 ][1 ].output .model .predict (np .ones ((1 , 10 ))), np .ndarray )
You can’t perform that action at this time.
0 commit comments