gdkrmr / dimRed

A Framework for Dimensionality Reduction in R
https://www.guido-kraemer.com/software/dimred/
GNU General Public License v3.0
73 stars 15 forks source link

Unable to work with dimRed on MNIST dataset #49

Closed nikitagupta0809 closed 2 years ago

nikitagupta0809 commented 4 years ago

Hi, I am trying to apply the metrics using the dimRed package on MNIST dataset. I am unable to load the dataset and get an object of dimRedData. Please help. Thanks!

gdkrmr commented 4 years ago

You need to input a matrix. I don't know where you get the MNIST data from and how it looks like, therefore I cannot give you concrete advice.

nikitagupta0809 commented 4 years ago

Here is a link to the database-http://yann.lecun.com/exdb/mnist/. I have fetched it using

mnist <- read_mnist()
i <- 5
image(1:28, 1:28, matrix(mnist$test$images[i,], nrow=28)[ , 28:1], 
    col = gray(seq(0, 1, 0.05)), xlab = "", ylab="")
## the labels for this image is: 
mnist$test$labels[i]

I saw how the metrics have been implemented using the datasets that you have provided in the package. However, I cannot find the functions to implement the same on other datasets like MNIST. Please let me know if I need to alter the dataset before I try to apply these metrics on them.

gdkrmr commented 4 years ago

I know the MNIST dataset, I still have no way of reproducing what you are doing. What does the output of str(mnist) look like?