package de.unidue.ltl.evaluation.measure;

import java.util.List;

import org.dkpro.statistics.correlation.PearsonCorrelation;
import org.dkpro.statistics.correlation.SpearmansRankCorrelation_old;


public class ScaleMeasure {

	private List<Double> val1;
	private List<Double> val2;
	
	
	public ScaleMeasure(List<Double> val1, List<Double> val2) {
		super();
		this.val1 = val1;
		this.val2 = val2;
	}

	public static void main(String[] args) {
		// TODO Auto-generated method stub

	}
	
	public Number getPearson(){
		
		Number result = 0.0;
		
		result = PearsonCorrelation.computeCorrelation(val1, val1);
		return result;
	}

	public Number getSpearman(){
		
		Number result = 0.0;
		
		result = SpearmansRankCorrelation_old.computeCorrelation(val1, val1);
		
		return result;

	}

}

@@ -191,16 +191,67 @@
 n_old;%0A%0A
+import de.unidue.ltl.evaluation.EvaluationResult;%0A%0A
 %0Apublic 
@@ -537,30 +537,40 @@
 %7D%0A%09%0A%09public 
-Number
+EvaluationResult
  getPearson(
@@ -581,34 +581,68 @@
 %09%0A%09%09
-Number result = 0.0;%0A%09%09%0A%09%09
+EvaluationResult eval = new EvaluationResult();%0A%09%09%0A%09%09double 
 resu
@@ -697,16 +697,48 @@
  val1);%0A
+%09%09%0A%09%09eval.setResult(result);%0A%09%09%0A
 %09%09return
@@ -738,22 +738,20 @@
 %09return 
-result
+eval
 ;%0A%09%7D%0A%0A%09p
@@ -756,22 +756,32 @@
 %09public 
-Number
+EvaluationResult
  getSpea
@@ -797,34 +797,68 @@
 %09%0A%09%09
-Number result = 0.0;%0A%09%09%0A%09%09
+EvaluationResult eval = new EvaluationResult();%0A%09%09%0A%09%09double 
 resu
@@ -922,24 +922,53 @@
 , val1);%0A%09%09%0A
+%09%09eval.setResult(result);%0A%09%09%0A
 %09%09return res
@@ -964,22 +964,20 @@
 %09return 
-result
+eval
 ;%0A%0A%09%7D%0A%0A%7D

update scale measure