10000 Fix doc issues for cluster_optics dbscan (#21419) · scikit-learn/scikit-learn@b926aca · GitHub
[go: up one dir, main page]

Skip to content

Commit b926aca

Browse files
MaggieChegeciku
and
ciku
authored
Fix doc issues for cluster_optics dbscan (#21419)
Co-authored-by: ciku <maggie@hellotractor.com>
1 parent ef7a028 commit b926aca

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

maint_tools/test_docstrings.py

-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
"sklearn.cluster._mean_shift.estimate_bandwidth",
3030
"sklearn.cluster._mean_shift.get_bin_seeds",
3131
"sklearn.cluster._mean_shift.mean_shift",
32-
"sklearn.cluster._optics.cluster_optics_dbscan",
3332
"sklearn.cluster._optics.cluster_optics_xi",
3433
"sklearn.cluster._optics.compute_optics_graph",
3534
"sklearn.cluster._spectral.spectral_clustering",

sklearn/cluster/_optics.py

+5-6
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ def _compute_core_distances_(X, neighbors, min_samples, working_memory):
398398
def compute_optics_graph(
399399
X, *, min_samples, max_eps, metric, p, metric_params, algorithm, leaf_size, n_jobs
400400
):
401-
"""Computes the OPTICS reachability graph.
401+
"""Compute the OPTICS reachability graph.
402402
403403
Read more in the :ref:`User Guide <optics>`.
404404
@@ -621,7 +621,7 @@ def _set_reach_dist(
621621

622622

623623
def cluster_optics_dbscan(*, reachability, core_distances, ordering, eps):
624-
"""Performs DBSCAN extraction for an arbitrary epsilon.
624+
"""Perform DBSCAN extraction for an arbitrary epsilon.
625625
626626
Extracting the clusters runs in linear time. Note that this results in
627627
``labels_`` which are close to a :class:`~sklearn.cluster.DBSCAN` with
@@ -630,13 +630,13 @@ def cluster_optics_dbscan(*, reachability, core_distances, ordering, eps):
630630
Parameters
631631
----------
632632
reachability : array of shape (n_samples,)
633-
Reachability distances calculated by OPTICS (``reachability_``)
633+
Reachability distances calculated by OPTICS (``reachability_``).
634634
635635
core_distances : array of shape (n_samples,)
636-
Distances at which points become core (``core_distances_``)
636+
Distances at which points become core (``core_distances_``).
637637
638638
ordering : array of shape (n_samples,)
639-
OPTICS ordered point indices (``ordering_``)
639+
OPTICS ordered point indices (``ordering_``).
640640
641641
eps : float
642642
DBSCAN ``eps`` parameter. Must be set to < ``max_eps``. Results
@@ -647,7 +647,6 @@ def cluster_optics_dbscan(*, reachability, core_distances, ordering, eps):
647647
-------
648648
labels_ : array of shape (n_samples,)
649649
The estimated labels.
650-
651650
"""
652651
n_samples = len(core_distances)
653652
labels = np.zeros(n_samples, dtype=int)

0 commit comments

Comments
 (0)
0