@@ -832,7 +832,7 @@ def transform(self, X, y=None):
832
832
X_new : array, shape [n_samples, k]
833
833
X transformed in the new space.
834
834
"""
835
- check_is_fitted (self , 'cluster_centers_' )
835
+ check_is_fitted (self , 'cluster_centers_' )
836
836
837
837
X = self ._check_test_data (X )
838
838
return self ._transform (X )
@@ -858,7 +858,7 @@ def predict(self, X):
858
858
labels : array, shape [n_samples,]
859
859
Index of the cluster each sample belongs to.
860
860
"""
861
- check_is_fitted (self , 'cluster_centers_' )
861
+ check_is_fitted (self , 'cluster_centers_' )
862
862
863
863
X = self ._check_test_data (X )
864
864
x_squared_norms = row_norms (X , squared = True )
@@ -877,7 +877,7 @@ def score(self, X, y=None):
877
877
score : float
878
878
Opposite of the value of X on the K-means objective.
879
879
"""
880
- check_is_fitted (self , 'cluster_centers_' )
880
+ check_is_fitted (self , 'cluster_centers_' )
881
881
882
882
X = self ._check_test_data (X )
883
883
x_squared_norms = row_norms (X , squared = True )
@@ -1429,7 +1429,7 @@ def predict(self, X):
1429
1429
labels : array, shape [n_samples,]
1430
1430
Index of the cluster each sample belongs to.
1431
1431
"""
1432
- check_is_fitted (self , 'cluster_centers_' )
1432
+ check_is_fitted (self , 'cluster_centers_' )
1433
1433
1434
1434
X = self ._check_test_data (X )
1435
1435
return self ._labels_inertia_minibatch (X )[0 ]
0 commit comments