This repository has been archived by the owner on Nov 16, 2023. It is now read-only.
/
KMeansPlusPlus.txt
56 lines (44 loc) · 2.12 KB
/
KMeansPlusPlus.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
"""
Machine Learning KMeans clustering algorithm
.. remarks::
`K-means <https://en.wikipedia.org/wiki/K-means_clustering>`_ is a
popular clustering algorithm. With `K-means++
<https://en.wikipedia.org/wiki/K-means%2b%2b>`_, the data is
clustered
into a specified number of clusters in order to minimize the
within-cluster sum of squares. K-means++ improves upon K-means by
using
a better method for choosing the initial cluster centers.
**Reference**
`https://www.microsoft.com/en-us/research/wp-
content/uploads/2016/02/ding15.pdf <https://www.microsoft.com/en-
us/research/wp-content/uploads/2016/02/ding15.pdf>`_
:param normalize: Specifies the type of automatic normalization used:
* ``"Auto"``: if normalization is needed, it is performed
automatically. This is the default choice.
* ``"No"``: no normalization is performed.
* ``"Yes"``: normalization is performed.
* ``"Warn"``: if normalization is needed, a warning
message is displayed, but normalization is not performed.
Normalization rescales disparate data ranges to a standard scale.
Feature
scaling insures the distances between data points are proportional
and
enables various optimization methods such as gradient descent to
converge
much faster. If normalization is performed, a ``MaxMin`` normalizer
is
used. It normalizes values in an interval [a, b] where ``-1 <= a <=
0``
and ``0 <= b <= 1`` and ``b - a = 1``. This normalizer preserves
sparsity by mapping zero to zero.
.. seealso::
:py:func:`LogisticRegressionClassifier
<nimbusml.linear_model.LogisticRegressionClassifier>`,
:py:func:`AveragedPerceptronBinaryClassifier
<nimbusml.linear_model.AveragedPerceptronBinaryClassifier>`
.. index:: models, classification, stocastic, gradient, descent
Example:
.. literalinclude:: /../nimbusml/examples/KMeansPlusPlus.py
:language: python
"""