Sophie

Sophie

distrib > Mandriva > 2010.2 > i586 > media > contrib-backports > by-pkgid > e578866d55cd81fdb23827cdf3cec911 > files > 504

python-scikits-learn-0.6-1mdv2010.2.i586.rpm



.. _example_cluster_kmeans_digits.py:


===========================================================
A demo of K-Means clustering on the handwritten digits data
===========================================================

Comparing various initialization strategies in terms of runtime and quality of
the results.

TODO: explode the ouput of the cluster labeling and digits.target groundtruth
as categorical boolean arrays of shape (n_sample, n_unique_labels) and measure
the Pearson correlation as an additional measure of the clustering quality.


**Python source code:** :download:`kmeans_digits.py <kmeans_digits.py>`

.. literalinclude:: kmeans_digits.py
    :lines: 13-