Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 889b829

Browse files
DOC Added information about space complexity to docs DBSCAN (scikit-learn#26783)
Co-authored-by: Guillaume Lemaitre <[email protected]>
1 parent 7de59b2 commit 889b829

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

sklearn/cluster/_dbscan.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,9 @@ class DBSCAN(ClusterMixin, BaseEstimator):
172172
Finds core samples of high density and expands clusters from them.
173173
Good for data which contains clusters of similar density.
174174
175+
The worst case memory complexity of DBSCAN is :math:`O({n}^2)`, which can
176+
occur when the `eps` param is large and `min_samples` is low.
177+
175178
Read more in the :ref:`User Guide <dbscan>`.
176179
177180
Parameters
@@ -184,8 +187,11 @@ class DBSCAN(ClusterMixin, BaseEstimator):
184187
and distance function.
185188
186189
min_samples : int, default=5
187-
The number of samples (or total weight) in a neighborhood for a point
188-
to be considered as a core point. This includes the point itself.
190+
The number of samples (or total weight) in a neighborhood for a point to
191+
be considered as a core point. This includes the point itself. If
192+
`min_samples` is set to a higher value, DBSCAN will find denser clusters,
193+
whereas if it is set to a lower value, the found clusters will be more
194+
sparse.
189195
190196
metric : str, or callable, default='euclidean'
191197
The metric to use when calculating distance between instances in a

0 commit comments

Comments
 (0)