@@ -561,17 +561,15 @@ def score(self, X, y=None):
561561
562562 Parameters
563563 ----------
564- X : numpy.ndarray of shape [n_samples, n_features]
565- The input samples.
564+ X : ignored
566565 y : ignored
567566
568567 Returns
569568 -------
570569 score : numpy.ndarray of (n_to_select_from_)
571570 :math:`\pi` importance for the given samples or features
572571 """
573- X , y = validate_data (self , X , y , reset = False )
574-
572+ validate_data (self , X , y , reset = False ) # present for API consistency
575573 return self .pi_
576574
577575 def _init_greedy_search (self , X , y , n_to_select ):
@@ -746,8 +744,7 @@ def score(self, X, y=None):
746744 score : numpy.ndarray of (n_to_select_from_)
747745 :math:`\pi` importance for the given samples or features
748746 """
749- X , y = validate_data (self , X , y , reset = False )
750-
747+ validate_data (self , X , y , reset = False ) # present for API consistency
751748 return self .pi_
752749
753750 def _init_greedy_search (self , X , y , n_to_select ):
@@ -941,8 +938,7 @@ def score(self, X, y=None):
941938 -------
942939 hausdorff : Hausdorff distances
943940 """
944- X , y = validate_data (self , X , y , reset = False )
945-
941+ validate_data (self , X , y , reset = False )
946942 return self .hausdorff_
947943
948944 def get_distance (self ):
@@ -1079,15 +1075,16 @@ def __init__(
10791075 )
10801076
10811077 def fit (self , X , y = None , warm_start = False ):
1082-
10831078 if self .mixing == 1.0 :
10841079 raise ValueError (
1085- "Mixing = 1.0 corresponds to traditional FPS."
1086- "Please use the FPS class."
1080+ "Mixing = 1.0 corresponds to traditional FPS. Please use the FPS class."
10871081 )
10881082
10891083 return super ().fit (X , y )
10901084
1085+ # docstring is inherited and set from the base class
1086+ fit .__doc__ = GreedySelector .fit .__doc__
1087+
10911088 def score (self , X , y = None ):
10921089 """Returns the Hausdorff distances of all samples to previous selections.
10931090
@@ -1104,8 +1101,7 @@ def score(self, X, y=None):
11041101 -------
11051102 hausdorff : Hausdorff distances
11061103 """
1107- X , y = validate_data (self , X , y , reset = False )
1108-
1104+ validate_data (self , X , y , reset = False )
11091105 return self .hausdorff_
11101106
11111107 def get_distance (self ):
0 commit comments