Java ApacheCommons数学相关性-如何使用
我正在尝试使用,但我有一些困难,因为我没有足够的数学/统计学背景 我从以下方面研究了斯皮尔曼的等级相关性:Java ApacheCommons数学相关性-如何使用,java,apache,statistics,apache-commons,Java,Apache,Statistics,Apache Commons,我正在尝试使用,但我有一些困难,因为我没有足够的数学/统计学背景 我从以下方面研究了斯皮尔曼的等级相关性: 我发现了以下例子: 我想计算我的班级的两个列表之间的相关性: public class TestClass{ int rank; // there may be two or more classes with the same rank - will need an averaging ties strategy } 我从中得出以下结论: NaturalRan
public class TestClass{
int rank; // there may be two or more classes with the same rank - will need an averaging ties strategy
}
我从中得出以下结论:
NaturalRanking naturalRanking = new NaturalRanking(NaNStrategy.FIXED,
TiesStrategy.AVERAGE);
RealMatrix dataMatrix= createRealMatrix(double[], int, int); // what do I need this matrix for and what parameters do I need to pass?
SpearmansCorrelation sc = SpearmansCorrelation(dataMatrix, naturalRanking);
sc.correlation(double[],double[]);// I have to convert my class into a list of doubles? How?
对于中的示例,您只需执行以下操作:
new SpearmansCorrelation().correlation(mathsList,englishList);
默认情况下,该类将平均平局