File tree Expand file tree Collapse file tree 1 file changed +11
-12
lines changed
sklearn/metrics/_plot/tests Expand file tree Collapse file tree 1 file changed +11
-12
lines changed Original file line number Diff line number Diff line change 5
5
6
6
from sklearn import clone
7
7
from sklearn .compose import make_column_transformer
8
- from sklearn .datasets import load_breast_cancer , load_iris
8
+ from sklearn .datasets import load_breast_cancer , make_classification
9
9
from sklearn .exceptions import NotFittedError
10
10
from sklearn .linear_model import LogisticRegression
11
11
from sklearn .metrics import RocCurveDisplay , auc , roc_curve
16
16
17
17
18
18
@pytest .fixture (scope = "module" )
19
- def data ():
20
- X , y = load_iris (return_X_y = True )
21
- # Avoid introducing test dependencies by mistake.
22
- X .flags .writeable = False
23
- y .flags .writeable = False
19
+ def data_binary ():
20
+ X , y = make_classification (
21
+ n_samples = 200 ,
22
+ n_features = 20 ,
23
+ n_informative = 5 ,
24
+ n_redundant = 2 ,
25
+ flip_y = 0.1 ,
26
+ class_sep = 0.8 ,
27
+ random_state = 42 ,
28
+ )
24
29
return X , y
25
30
26
31
27
- @pytest .fixture (scope = "module" )
28
- def data_binary (data ):
29
- X , y = data
30
- return X [y < 2 ], y [y < 2 ]
31
-
32
-
33
32
@pytest .mark .parametrize ("response_method" , ["predict_proba" , "decision_function" ])
34
33
@pytest .mark .parametrize ("with_sample_weight" , [True , False ])
35
34
@pytest .mark .parametrize ("drop_intermediate" , [True , False ])
You can’t perform that action at this time.
0 commit comments