Skip to content
Snippets Groups Projects
Commit 4e7ef588 authored by Gael Varoquaux's avatar Gael Varoquaux
Browse files

DOC: Work on the front page.


git-svn-id: https://scikit-learn.svn.sourceforge.net/svnroot/scikit-learn/trunk@681 22fbfee3-77ab-4535-9bad-27d1bd3bc7d8
parent d09d6174
No related branches found
No related tags found
No related merge requests found
......@@ -40,6 +40,42 @@ It implements several machine learning algorithms, including Support
Vector Machines, Gaussian Mixture Models, Neural Networks, Nearest
Neighbors, Generalized Linear Models, etc.
.. image:: auto_examples/images/plot_digits_classification.png
:align: right
:scale: 50
.. raw:: html
<small>
**Example**::
import pylab as pl
from scikits.learn import datasets, svm
digits = datasets.load_digits()
for index, (image, label) in enumerate(zip(digits.images, digits.target)[:4]):
pl.subplot(2, 4, index+1)
pl.imshow(image, cmap=pl.cm.gray_r)
pl.title('Training: %i' % label)
n_features = len(digits.images)
data = digits.images.reshape((n_features, -1))
classifier = svm.SVC()
classifier.fit(data[:n_features/2], digits.target[:n_features/2])
for index, image in enumerate(digits.images[n_features/2:n_features/2+4]):
pl.subplot(2, 4, index+5)
pl.imshow(image, cmap=pl.cm.gray_r)
pl.title('Prediction: %i' % classifier.predict(image.ravel()))
.. raw:: html
</small>
User guide: contents
======================
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment