@@ -261,13 +261,13 @@ def fit(self, X, y=None):
261261        # Extract clusters from the calculated orders and reachability 
262262        if  self .cluster_method  ==  'xi' :
263263            labels_ , clusters_  =  cluster_optics_xi (
264-                 self .reachability_ ,
265-                 self .predecessor_ ,
266-                 self .ordering_ ,
267-                 self .min_samples ,
268-                 self .min_cluster_size ,
269-                 self .xi ,
270-                 self .predecessor_correction )
264+                 reachability = self .reachability_ ,
265+                 predecessor = self .predecessor_ ,
266+                 ordering = self .ordering_ ,
267+                 min_samples = self .min_samples ,
268+                 min_cluster_size = self .min_cluster_size ,
269+                 xi = self .xi ,
270+                 predecessor_correction = self .predecessor_correction )
271271            self .cluster_hierarchy_  =  clusters_ 
272272        elif  self .cluster_method  ==  'dbscan' :
273273            if  self .eps  is  None :
@@ -279,10 +279,10 @@ def fit(self, X, y=None):
279279                raise  ValueError ('Specify an epsilon smaller than %s. Got %s.' 
280280                                 %  (self .max_eps , eps ))
281281
282-             labels_  =  cluster_optics_dbscan (self . reachability_ , 
283-                                              self .core_distances_ ,
284-                                              self .ordering_ ,
285-                                              eps )
282+             labels_  =  cluster_optics_dbscan (
283+                 reachability = self .reachability_ ,
284+                 core_distances = self .core_distances_ ,
285+                 ordering = self . ordering_ ,  eps = eps )
286286
287287        self .labels_  =  labels_ 
288288        return  self 
@@ -339,7 +339,8 @@ def _compute_core_distances_(X, neighbors, min_samples, working_memory):
339339    return  core_distances 
340340
341341
342- def  compute_optics_graph (X , min_samples , max_eps , metric , p , metric_params ,
342+ @_deprecate_positional_args  
343+ def  compute_optics_graph (X , * , min_samples , max_eps , metric , p , metric_params ,
343344                         algorithm , leaf_size , n_jobs ):
344345    """Computes the OPTICS reachability graph. 
345346
@@ -538,7 +539,8 @@ def _set_reach_dist(core_distances_, reachability_, predecessor_,
538539    predecessor_ [unproc [improved ]] =  point_index 
539540
540541
541- def  cluster_optics_dbscan (reachability , core_distances , ordering , eps ):
542+ @_deprecate_positional_args  
543+ def  cluster_optics_dbscan (* , reachability , core_distances , ordering , eps ):
542544    """Performs DBSCAN extraction for an arbitrary epsilon. 
543545
544546    Extracting the clusters runs in linear time. Note that this results in 
@@ -577,7 +579,7 @@ def cluster_optics_dbscan(reachability, core_distances, ordering, eps):
577579    return  labels 
578580
579581
580- def  cluster_optics_xi (reachability , predecessor , ordering , min_samples ,
582+ def  cluster_optics_xi (* ,  reachability , predecessor , ordering , min_samples ,
581583                      min_cluster_size = None , xi = 0.05 ,
582584                      predecessor_correction = True ):
583585    """Automatically extract clusters according to the Xi-steep method. 
0 commit comments