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:
182
182
trained_model = data[ 0] [ 1 ] .output.model
183
183
trained_model.predict(np.random.rand(1, 30))
184
184
```
185
+ Please check the value of ` data[N][0] ` to ensure that you are not using
186
+ a permuted model.
185
187
- One figure per metric with performance distribution across splits (with or
186
188
without null distribution trained on permuted labels)
187
189
- 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 1
1
import os
2
2
from ..classifier import gen_workflow , run_workflow
3
+ import numpy as np
3
4
4
5
5
6
def test_classifier (tmpdir ):
@@ -32,6 +33,8 @@ def test_classifier(tmpdir):
32
33
assert results [0 ][0 ]["ml_wf.clf_info" ][1 ] == "MLPClassifier"
33
34
assert results [0 ][0 ]["ml_wf.permute" ]
34
35
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 )
35
38
36
39
37
40
def test_regressor (tmpdir ):
@@ -69,3 +72,5 @@ def test_regressor(tmpdir):
69
72
assert results [0 ][0 ]["ml_wf.clf_info" ][- 1 ][1 ] == "MLPRegressor"
70
73
assert results [0 ][0 ]["ml_wf.permute" ]
71
74
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