@@ -965,11 +965,11 @@ def __init__(
965965
966966 def score (self , X , y = None ):
967967 """
968- Returns the Haussdorf distances of all samples to previous selections
968+ Returns the Hausdorff distances of all samples to previous selections
969969
970970 NOTE: This function does not compute the importance score each time it
971- is called, in order to avoid unnecessary computations. The haussdorf
972- distance is updated in :py:func:`self._update_haussdorf `
971+ is called, in order to avoid unnecessary computations. The hausdorff
972+ distance is updated in :py:func:`self._update_hausdorff `
973973
974974 Parameters
975975 ----------
@@ -978,9 +978,9 @@ def score(self, X, y=None):
978978
979979 Returns
980980 -------
981- haussdorf : Haussdorf distances
981+ hausdorff : Hausdorff distances
982982 """
983- return self .haussdorf_
983+ return self .hausdorff_
984984
985985 def get_distance (self ):
986986 """
@@ -1002,40 +1002,40 @@ def get_distance(self):
10021002 Returns
10031003 -------
10041004
1005- haussdorf : ndarray of shape (`n_to_select_from_`)
1005+ hausdorff : ndarray of shape (`n_to_select_from_`)
10061006 the minimum distance from each point to the set of selected
10071007 points. once a point is selected, the distance is not updated;
10081008 the final list will reflect the distances when selected.
10091009
10101010 """
1011- return self .haussdorf_
1011+ return self .hausdorff_
10121012
10131013 def get_select_distance (self ):
10141014 """
10151015
10161016 Returns
10171017 -------
10181018
1019- haussdorf_at_select : ndarray of shape (`n_to_select`)
1019+ hausdorff_at_select : ndarray of shape (`n_to_select`)
10201020 at the time of selection, the minimum distance from each
10211021 selected point to the set of previously selected points.
10221022
10231023 """
10241024 mask = self .get_support (indices = True , ordered = True )
1025- return self .haussdorf_at_select_ [mask ]
1025+ return self .hausdorff_at_select_ [mask ]
10261026
10271027 def _init_greedy_search (self , X , y , n_to_select ):
10281028 """
10291029 Initializes the search. Prepares an array to store the selections,
10301030 makes the initial selection (unless provided), and
1031- computes the starting haussdorf distances.
1031+ computes the starting hausdorff distances.
10321032 """
10331033
10341034 super ()._init_greedy_search (X , y , n_to_select )
10351035
10361036 self .norms_ = (X ** 2 ).sum (axis = abs (self ._axis - 1 ))
1037- self .haussdorf_ = np .full (X .shape [self ._axis ], np .inf )
1038- self .haussdorf_at_select_ = np .full (X .shape [self ._axis ], np .inf )
1037+ self .hausdorff_ = np .full (X .shape [self ._axis ], np .inf )
1038+ self .hausdorff_at_select_ = np .full (X .shape [self ._axis ], np .inf )
10391039
10401040 if self .initialize == "random" :
10411041 random_state = check_random_state (self .random_state )
@@ -1055,8 +1055,8 @@ def _init_greedy_search(self, X, y, n_to_select):
10551055 else :
10561056 raise ValueError ("Invalid value of the initialize parameter" )
10571057
1058- def _update_haussdorf (self , X , y , last_selected ):
1059- self .haussdorf_at_select_ [last_selected ] = self .haussdorf_ [last_selected ]
1058+ def _update_hausdorff (self , X , y , last_selected ):
1059+ self .hausdorff_at_select_ [last_selected ] = self .hausdorff_ [last_selected ]
10601060
10611061 # distances of all points to the new point
10621062 if self ._axis == 1 :
@@ -1068,15 +1068,15 @@ def _update_haussdorf(self, X, y, last_selected):
10681068 self .norms_ + self .norms_ [last_selected ] - 2 * X [last_selected ] @ X .T
10691069 )
10701070
1071- # update in-place the Haussdorf distance list
1072- np .minimum (self .haussdorf_ , new_dist , self .haussdorf_ )
1071+ # update in-place the Hausdorff distance list
1072+ np .minimum (self .hausdorff_ , new_dist , self .hausdorff_ )
10731073
10741074 def _update_post_selection (self , X , y , last_selected ):
10751075 """
10761076 Saves the most recent selections, increments the counter,
1077- and, recomputes haussdorf distances.
1077+ and, recomputes hausdorff distances.
10781078 """
1079- self ._update_haussdorf (X , y , last_selected )
1079+ self ._update_hausdorff (X , y , last_selected )
10801080 super ()._update_post_selection (X , y , last_selected )
10811081
10821082
@@ -1135,11 +1135,11 @@ def __init__(
11351135
11361136 def score (self , X , y = None ):
11371137 """
1138- Returns the Haussdorf distances of all samples to previous selections
1138+ Returns the Hausdorff distances of all samples to previous selections
11391139
11401140 NOTE: This function does not compute the importance score each time it
1141- is called, in order to avoid unnecessary computations. The haussdorf
1142- distance is updated in :py:func:`self._update_haussdorf `
1141+ is called, in order to avoid unnecessary computations. The hausdorff
1142+ distance is updated in :py:func:`self._update_hausdorff `
11431143
11441144 Parameters
11451145 ----------
@@ -1148,43 +1148,43 @@ def score(self, X, y=None):
11481148
11491149 Returns
11501150 -------
1151- haussdorf : Haussdorf distances
1151+ hausdorff : Hausdorff distances
11521152 """
1153- return self .haussdorf_
1153+ return self .hausdorff_
11541154
11551155 def get_distance (self ):
11561156 """
11571157
11581158 Returns
11591159 -------
11601160
1161- haussdorf : ndarray of shape (`n_to_select_from_`)
1161+ hausdorff : ndarray of shape (`n_to_select_from_`)
11621162 the minimum distance from each point to the set of selected
11631163 points. once a point is selected, the distance is not updated;
11641164 the final list will reflect the distances when selected.
11651165
11661166 """
1167- return self .haussdorf_
1167+ return self .hausdorff_
11681168
11691169 def get_select_distance (self ):
11701170 """
11711171
11721172 Returns
11731173 -------
11741174
1175- haussdorf_at_select : ndarray of shape (`n_to_select`)
1175+ hausdorff_at_select : ndarray of shape (`n_to_select`)
11761176 at the time of selection, the minimum distance from each
11771177 selected point to the set of previously selected points.
11781178
11791179 """
11801180 mask = self .get_support (indices = True , ordered = True )
1181- return self .haussdorf_at_select_ [mask ]
1181+ return self .hausdorff_at_select_ [mask ]
11821182
11831183 def _init_greedy_search (self , X , y , n_to_select ):
11841184 """
11851185 Initializes the search. Prepares an array to store the selections,
11861186 makes the initial selection (unless provided), and
1187- computes the starting haussdorf distances.
1187+ computes the starting hausdorff distances.
11881188 """
11891189
11901190 super ()._init_greedy_search (X , y , n_to_select )
@@ -1205,12 +1205,12 @@ def _init_greedy_search(self, X, y, n_to_select):
12051205 raise ValueError ("Invalid value of the initialize parameter" )
12061206
12071207 self .selected_idx_ [0 ] = initialize
1208- self .haussdorf_ = np .full (X .shape [self ._axis ], np .inf )
1209- self .haussdorf_at_select_ = np .full (X .shape [self ._axis ], np .inf )
1208+ self .hausdorff_ = np .full (X .shape [self ._axis ], np .inf )
1209+ self .hausdorff_at_select_ = np .full (X .shape [self ._axis ], np .inf )
12101210 self ._update_post_selection (X , y , self .selected_idx_ [0 ])
12111211
1212- def _update_haussdorf (self , X , y , last_selected ):
1213- self .haussdorf_at_select_ [last_selected ] = self .haussdorf_ [last_selected ]
1212+ def _update_hausdorff (self , X , y , last_selected ):
1213+ self .hausdorff_at_select_ [last_selected ] = self .hausdorff_ [last_selected ]
12141214
12151215 # distances of all points to the new point
12161216 new_dist = (
@@ -1219,15 +1219,15 @@ def _update_haussdorf(self, X, y, last_selected):
12191219 - 2 * np .take (self .pcovr_distance_ , last_selected , axis = self ._axis )
12201220 )
12211221
1222- # update in-place the Haussdorf distance list
1223- np .minimum (self .haussdorf_ , new_dist , self .haussdorf_ )
1222+ # update in-place the Hausdorff distance list
1223+ np .minimum (self .hausdorff_ , new_dist , self .hausdorff_ )
12241224
12251225 def _update_post_selection (self , X , y , last_selected ):
12261226 """
12271227 Saves the most recent selections, increments the counter,
1228- and, recomputes haussdorf distances.
1228+ and, recomputes hausdorff distances.
12291229 """
1230- self ._update_haussdorf (X , y , last_selected )
1230+ self ._update_hausdorff (X , y , last_selected )
12311231 super ()._update_post_selection (X , y , last_selected )
12321232
12331233 def _more_tags (self ):
0 commit comments