@@ -0,0 +1,1675 @@
+%22%22%22%0A================================%0ARecognizing hand-written digits%0A================================%0A%0AAn example showing how the scikit-learn can be used to recognize images of %0Ahand-written digits.%0A%0A%22%22%22%0A# Author: Gael Varoquaux %3Cgael dot varoquaux at normalesup dot org%3E%0A# License: Simplified BSD%0A%0A# Standard scientific Python imports%0Aimport pylab as pl%0A%0A# The digits dataset%0Afrom scikits.learn import datasets%0Adigits = datasets.load_digits()%0A%0A# The data that we are interesting in is made of 8x8 images of digits,%0A# let's have a look at the first 3 images. We know which digit they%0A# represent: it is given in the 'target' of the dataset.%0Afor index, (image, label) in enumerate(zip(digits.images, digits.target)%5B:4%5D):%0A    pl.subplot(2, 4, index+1)%0A    pl.imshow(image, cmap=pl.cm.gray_r)%0A    pl.title('Training: %25i' %25 label)%0A%0A# To apply an classifier on this data, we need to flatten the image, to%0A# turn the data in a (samples, feature) matrix:%0An_features = len(digits.images)%0Adata = digits.images.reshape((n_features, -1))%0A%0A# Import a classifier:%0Afrom scikits.learn import svm%0Aclassifier = svm.SVC()%0A%0A# We learn the digits on the first half of the digits%0Aclassifier.fit(data%5B:n_features/2%5D, digits.target%5B:n_features/2%5D)%0A%0A# Now predict the value of the digit on the second half:%0Apredicted = classifier.predict(data%5Bn_features/2:%5D)%0A%0Afor index, (image, prediction) in enumerate(zip(%0A                                       digits.images%5Bn_features/2:%5D, %0A                                       predicted%0A                                    )%5B:4%5D):%0A    pl.subplot(2, 4, index+5)%0A    pl.imshow(image, cmap=pl.cm.gray_r)%0A    pl.title('Prediction: %25i' %25 prediction)%0A%0A%0Apl.show()%0A

Add an example doing classification on digits.