The Isomap algorithm is an approach to manifold learning. Isomap seeks a lower dimensional embedding of a set of high dimensional data points estimating the intrinsic geometry of a data manifold based on a rough estimate of each data point’s neighbors.
The scikit-learn library provides a great implmentation of the Isomap algorithm and a dataset of handwritten digits. In this post we'll see how to load the dataset and how to compute an embedding of the dataset on a bidimentional space.
Let's load the dataset and show some samples:
CODE:
from pylab import scatter,text,show,cm,figure
from pylab import subplot,imshow,NullLocator
from sklearn import manifold, datasets
# load the digits dataset
# about 180 samples for the digits (0,1,2,3,4)
digits = datasets.load_digits(n_class=5)
X = digits.data
color = digits.target
# shows some digits
figure(1)
for i in range(36):
ax = subplot(6,6,i)
ax.xaxis.set_major_locator(NullLocator()) # remove ticks
ax.yaxis.set_major_locator(NullLocator())
imshow(digits.images[i], cmap=cm.gray_r) The result should be as follows:

hwdigits.png[attach]792574[/attach][attach]792574[/attach][attach]792574[/attach][attach]792574[/attach]
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/301743/viewspace-734952/
,如需转载,请注明出处,否则将追究法律责任。