Perform the following steps to perform nonlinear dimension reduction with ISOMAP:
- First, install and load the RnavGraphImageData and vegan packages:
> install.packages("RnavGraphImageData") > install.packages("vegan") > library(RnavGraphImageData) > library(vegan)
- You can then load the dataset, digits:
> data(digits)
- Rotate and plot the image:
> sample.digit = matrix(digits[,3000],ncol = 16, byrow=FALSE) > image(t(sample.digit)[,nrow(sample.digit):1])
- Next, you can randomly sample 300 digits from the population:
> set.seed(2) > digit.idx = sample(1:ncol(digits),size = 600) ...