lejon / T-SNE-Java

Pure Java implementation of Van Der Maaten and Hinton's t-sne clustering algorithm
197 stars 60 forks source link

Unable to run example #5

Closed mvaudel closed 8 years ago

mvaudel commented 8 years ago

Hi,

When trying to run the example of the main page, t-SNE returns an error:

java.lang.NumberFormatException: For input string: "1.0000000e+00   1.0000000e+00   1.0000000e+00   1.0000000e+00...
    at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:2043)
    at sun.misc.FloatingDecimal.parseDouble(FloatingDecimal.java:110)
    at java.lang.Double.parseDouble(Double.java:538)
    at com.jujutsu.utils.MatrixUtils.simpleRead2DMatrix(MatrixUtils.java:26)

Looks like your column delimiter is wrong. You might want to change

double [][] X = MatrixUtils.simpleRead2DMatrix(new File("src/main/resources/datasets/mnist2500_X.txt"), ",");

into

double [][] X = MatrixUtils.simpleRead2DMatrix(new File("src/main/resources/datasets/mnist2500_X.txt"), "   ");

Thank you,

Marc

lejon commented 8 years ago

Thanks, for the heads up, I'll have a look at it!

Cheers! -Leif

On 13 May 2016, at 13:28, Marc Vaudel notifications@github.com wrote:

Hi,

When trying to run the example of the main page, t-SNE returns an error:

java.lang.NumberFormatException: For input string: "1.0000000e+00 1.0000000e+00 1.0000000e+00 1.0000000e+00

Can you give it a look?

Thank you,

Marc

— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub