Skip to content

DOC Add link to plot_optics.py #26970

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Aug 15, 2023
1 change: 1 addition & 0 deletions examples/cluster/plot_optics.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
Finds core samples of high density and expands clusters from them.
This example uses data that is generated so that the clusters have
different densities.

The :class:`~cluster.OPTICS` is first used with its Xi cluster detection
method, and then setting specific thresholds on the reachability, which
corresponds to :class:`~cluster.DBSCAN`. We can see that the different
Expand Down
3 changes: 3 additions & 0 deletions sklearn/cluster/_optics.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,9 @@ class OPTICS(ClusterMixin, BaseEstimator):
>>> clustering = OPTICS(min_samples=2).fit(X)
>>> clustering.labels_
array([0, 0, 0, 1, 1, 1])

For a more detailed example see
:ref:`sphx_glr_auto_examples_cluster_plot_optics.py`.
"""

_parameter_constraints: dict = {
Expand Down