Bonsoir à vous!

j'ai le code suivant, qui est sensé faire une analyse en composantes principales de mon fichier .csv. Pour cela, j'utilise opencsv et
javastat.multivariate.PCA. Le problème est qu'alors que j'ai à peine retoucher le code fournis sur cette page, qui contenait aussi des erreurs, en specifiant le type des variables pPrincipalComponent et vVariable, il me met:

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
Exception in thread "main" java.lang.IllegalArgumentException: Wrong input data type.
	at javastat.util.DataManager.castDoubleObject(DataManager.java:3121)
	at javastat.multivariate.PCA.principalComponents(PCA.java:424)
	at pca.Apply2.main(Apply2.java:34)
Qu'est-ce que j'ai mal fait? J'ai tout mis en double puisque PCA n'utilise que ça. Je ne comprend pas, pourriez-vous m'aider, s'il vous plait?

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
package pca;
 
import java.io.FileReader;
import java.io.IOException;
import java.util.*;
import java.lang.Object;
import javastat.multivariate.PCA;
import javastat.StatisticalAnalysis;
import au.com.bytecode.opencsv.CSVReader;
 
public class Apply2 {
 
	public static void main(String[] args) throws IOException 
    {
        CSVReader reader = new CSVReader(new 
                FileReader("stockori/genotype.csv"));
        String [] nextLine;
        double[][] myTable= new double[697][149];
        while ((nextLine = reader.readNext()) != null) 
        {
            // nextLine[] is an array of values from the line
        	int j=0;
            for (int i=0; i<nextLine.length; i++)
            {
                myTable[j][i]=Double.parseDouble(nextLine[i]);
            }
            j++;
        }
        System.out.println(myTable.length);
 
        Hashtable argument2 = new Hashtable(); 
        PCA testclass4 = new PCA(argument2, null); 
        double[][]pPrincipalComponents= testclass4.principalComponents(argument2, myTable); 
        double[] vVariance = testclass4.variance(argument2, myTable);
    }
 
}