@@ -71,7 +71,7 @@ def build_quadruplets():
71
71
72
72
@pytest .mark .parametrize ('estimator, build_dataset' , list_estimators ,
73
73
ids = ids_estimators )
74
- def test_score_pairwise (estimator , build_dataset ):
74
+ def test_score_pairs_pairwise (estimator , build_dataset ):
75
75
# Computing pairwise scores should return an euclidean distance matrix.
76
76
inputs , labels = build_dataset ()
77
77
X , _ = load_iris (return_X_y = True )
@@ -92,7 +92,7 @@ def test_score_pairwise(estimator, build_dataset):
92
92
93
93
@pytest .mark .parametrize ('estimator, build_dataset' , list_estimators ,
94
94
ids = ids_estimators )
95
- def test_score_toy_example (estimator , build_dataset ):
95
+ def test_score_pairs_toy_example (estimator , build_dataset ):
96
96
# Checks that score_pairs works on a toy example
97
97
inputs , labels = build_dataset ()
98
98
X , _ = load_iris (return_X_y = True )
@@ -110,7 +110,7 @@ def test_score_toy_example(estimator, build_dataset):
110
110
111
111
@pytest .mark .parametrize ('estimator, build_dataset' , list_estimators ,
112
112
ids = ids_estimators )
113
- def test_score_finite (estimator , build_dataset ):
113
+ def test_score_pairs_finite (estimator , build_dataset ):
114
114
# tests that the score is finite
115
115
inputs , labels = build_dataset ()
116
116
model = clone (estimator )
@@ -122,16 +122,16 @@ def test_score_finite(estimator, build_dataset):
122
122
123
123
@pytest .mark .parametrize ('estimator, build_dataset' , list_estimators ,
124
124
ids = ids_estimators )
125
- def tests_score_dim (estimator , build_dataset ):
126
- # scoring of 3D arrays should return 1D array (several pairs ),
127
- # and scoring of 2D arrays (one pair ) should return a scalar (0D array).
125
+ def tests_score_pairs_dim (estimator , build_dataset ):
126
+ # scoring of 3D arrays should return 1D array (several tuples ),
127
+ # and scoring of 2D arrays (one tuple ) should return a scalar (0D array).
128
128
inputs , labels = build_dataset ()
129
129
model = clone (estimator )
130
130
model .fit (inputs , labels )
131
131
X , _ = load_iris (return_X_y = True )
132
- pairs = np .array (list (product (X , X )))
133
- assert model .score_pairs (pairs ).shape == (pairs .shape [0 ],)
134
- assert np .isscalar (model .score_pairs (pairs [1 ]))
132
+ tuples = np .array (list (product (X , X )))
133
+ assert model .score_pairs (tuples ).shape == (tuples .shape [0 ],)
134
+ assert np .isscalar (model .score_pairs (tuples [1 ]))
135
135
136
136
137
137
def check_is_distance_matrix (pairwise ):
0 commit comments