moj.similarity.measures
Class PearsonCorrS_row

java.lang.Object
  extended by moj.similarity.SimilarityMeasure
      extended by moj.similarity.measures.PearsonCorrS_row

public class PearsonCorrS_row
extends SimilarityMeasure

PEARSON CORRELATION COEFFICIENT
http://stat.tamu.edu/stat30x/notes/node39.html
similarity [-1, 1]
Usage: for interval & count(?) data.
Sample data:
X 1 2 3
Y 2 5 6
Result:
1.0 0.9607689228305224
0.9607689228305224 1.0
Source: HyperStat Online Contents, Chapter3, Describing Bivariate Data http://davidmlane.com/hyperstat/desc_biv.html

Version:
2004-Oct-01
Author:
Martin Hassel

Constructor Summary
PearsonCorrS_row()
           
 
Method Summary
 double[][] analyzeMatrix(float[][] data_matrix)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PearsonCorrS_row

public PearsonCorrS_row()
Method Detail

analyzeMatrix

public double[][] analyzeMatrix(float[][] data_matrix)
Specified by:
analyzeMatrix in class SimilarityMeasure
Parameters:
data_matrix - an array of float arrays denoting the rows in the matrix that are to be compared for similarity.
Returns:
an array of double arrays containing the similarities between all rows