8000 DOC fix docstring of AffinityPropagation based on sklearn guideline (… · scikit-learn/scikit-learn@10eb17c · GitHub
[go: up one dir, main page]

Skip to content

Commit 10eb17c

Browse files
cgsavardglemaitre
authored andcommitted
DOC fix docstring of AffinityPropagation based on sklearn guideline (#15777)
1 parent 893a4d4 commit 10eb17c

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

sklearn/cluster/_affinity_propagation.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -242,51 +242,51 @@ class AffinityPropagation(ClusterMixin, BaseEstimator):
242242
243243
Parameters
244244
----------
245-
damping : float, optional, default: 0.5
245+
damping : float, default=0.5
246246
Damping factor (between 0.5 and 1) is the extent to
247247
which the current value is maintained relative to
248248
incoming values (weighted 1 - damping). This in order
249249
to avoid numerical oscillations when updating these
250250 8000
values (messages).
251251
252-
max_iter : int, optional, default: 200
252+
max_iter : int, default=200
253253
Maximum number of iterations.
254254
255-
convergence_iter : int, optional, default: 15
255+
convergence_iter : int, default=15
256256
Number of iterations with no change in the number
257257
of estimated clusters that stops the convergence.
258258
259-
copy : boolean, optional, default: True
259+
copy : bool, default=True
260260
Make a copy of input data.
261261
262-
preference : array-like, shape (n_samples,) or float, optional
262+
preference : array-like of shape (n_samples,) or float, default=None
263263
Preferences for each point - points with larger values of
264264
preferences are more likely to be chosen as exemplars. The number
265265
of exemplars, ie of clusters, is influenced by the input
266266
preferences value. If the preferences are not passed as arguments,
267267
they will be set to the median of the input similarities.
268268
269-
affinity : string, optional, default=``euclidean``
270-
Which affinity to use. At the moment ``precomputed`` and
271-
``euclidean`` are supported. ``euclidean`` uses the
269+
affinity : {'euclidean', 'precomputed'}, default='euclidean'
270+
Which affinity to use. At the moment 'precomputed' and
271+
``euclidean`` are supported. 'euclidean' uses the
272272
negative squared euclidean distance between points.
273273
274-
verbose : boolean, optional, default: False
274+
verbose : bool, default=False
275275
Whether to be verbose.
276276
277277
278278
Attributes
279279
----------
280-
cluster_centers_indices_ : array, shape (n_clusters,)
280+
cluster_centers_indices_ : ndarray of shape (n_clusters,)
281281
Indices of cluster centers
282282
283-
cluster_centers_ : array, shape (n_clusters, n_features)
283+
cluster_centers_ : ndarray of shape (n_clusters, n_features)
284284
Cluster centers (if affinity != ``precomputed``).
285285
286-
labels_ : array, shape (n_samples,)
286+
labels_ : ndarray of shape (n_samples,)
287287
Labels of each point
288288
289-
affinity_matrix_ : array, shape (n_samples, n_samples)
289+
affinity_matrix_ : ndarray of shape (n_samples, n_samples)
290290
Stores the affinity matrix used in ``fit``.
291291
292292
n_iter_ : int

0 commit comments

Comments
 (0)
0