Index: /trunk/CrossPare/experimentconfig.xsd
===================================================================
--- /trunk/CrossPare/experimentconfig.xsd	(revision 44)
+++ /trunk/CrossPare/experimentconfig.xsd	(revision 45)
@@ -20,5 +20,5 @@
         <xs:element name="setwisepostprocessor" type="setupType" minOccurs="0" maxOccurs="unbounded"/>
         <xs:element name="setwisetrainer" type="setupType" minOccurs="0" maxOccurs="unbounded"/>
-        <xs:element name="setwisetestdataawaretrainer" type="setupType" minOccurs="0" maxOccurs="unbounded"/>
+        <xs:element name="setwisetestdataawaretrainer" type="metricMatchingType" minOccurs="0" maxOccurs="unbounded"/>
         <xs:element name="preprocessor" type="setupType" minOccurs="0" maxOccurs="unbounded"/>
         <xs:element name="pointwiseselector" type="setupType" minOccurs="0" maxOccurs="unbounded"/>
@@ -43,3 +43,9 @@
     <xs:attribute name="param" type="xs:string" />
   </xs:complexType>
+  <xs:complexType name="metricMatchingType">
+    <xs:attribute name="name" type="xs:string" />
+    <xs:attribute name="param" type="xs:string" />
+    <xs:attribute name="method" type="xs:string" />
+    <xs:attribute name="threshold" type="xs:float" />
+  </xs:complexType>
 </xs:schema>
Index: /trunk/CrossPare/src/de/ugoe/cs/cpdp/ExperimentConfiguration.java
===================================================================
--- /trunk/CrossPare/src/de/ugoe/cs/cpdp/ExperimentConfiguration.java	(revision 44)
+++ /trunk/CrossPare/src/de/ugoe/cs/cpdp/ExperimentConfiguration.java	(revision 45)
@@ -489,4 +489,6 @@
                         .newInstance();
                 trainer.setParameter(attributes.getValue("param"));
+                trainer.setMethod(attributes.getValue("method"));
+                trainer.setThreshold(attributes.getValue("threshold"));
                 setwiseTestdataAwareTrainers.add(trainer);
             }
Index: /trunk/CrossPare/src/de/ugoe/cs/cpdp/training/ISetWiseTestdataAwareTrainingStrategy.java
===================================================================
--- /trunk/CrossPare/src/de/ugoe/cs/cpdp/training/ISetWiseTestdataAwareTrainingStrategy.java	(revision 44)
+++ /trunk/CrossPare/src/de/ugoe/cs/cpdp/training/ISetWiseTestdataAwareTrainingStrategy.java	(revision 45)
@@ -9,3 +9,6 @@
 
     String getName();
+    
+    void setMethod(String method);
+    void setThreshold(String threshold);
 }
Index: /trunk/CrossPare/src/de/ugoe/cs/cpdp/training/MetricMatchingTraining.java
===================================================================
--- /trunk/CrossPare/src/de/ugoe/cs/cpdp/training/MetricMatchingTraining.java	(revision 44)
+++ /trunk/CrossPare/src/de/ugoe/cs/cpdp/training/MetricMatchingTraining.java	(revision 45)
@@ -23,7 +23,7 @@
 
 import org.apache.commons.collections4.list.SetUniqueList;
-import org.apache.commons.math3.stat.inference.ChiSquareTest;  
-import org.apache.commons.math3.stat.correlation.SpearmansCorrelation;  // spearman ist drin
-import org.apache.commons.math3.stat.inference.KolmogorovSmirnovTest; // kolmogorov nicht in der 3.1 
+import org.apache.commons.math3.stat.inference.ChiSquareTest;
+import org.apache.commons.math3.stat.correlation.SpearmansCorrelation;
+import org.apache.commons.math3.stat.inference.KolmogorovSmirnovTest;
 
 import de.ugoe.cs.util.console.Console;
@@ -42,4 +42,6 @@
     private final Classifier classifier = new MetricMatchingClassifier();
     
+    private String method;
+    private float threshold;
     
     /**
@@ -52,12 +54,24 @@
     }
     
-    /*
+    
     @Override
     public String getName() {
-        return "MetricMatching_" + this.classifier.getName();
-    }*/
+        return "MetricMatching_" + classifierName;
+    }
+
+
+    @Override
+    public void setMethod(String method) {
+        this.method = method;
+    }
+
+
+    @Override
+    public void setThreshold(String threshold) {
+        this.threshold = Float.parseFloat(threshold);
+    }
 
 	/**
-	 * We need the testdata instances to do a metric matching so in this special case we get this data
+	 * We need the testdata instances to do a metric matching, so in this special case we get this data
 	 * before evaluation
 	 */
@@ -76,7 +90,13 @@
 			//tmp.kolmogorovSmirnovTest(0.05);
 			
-			tmp.spearmansRankCorrelation(0.5);
-			
-			//Console.traceln(Level.INFO, "Tested traindata set " + num + " for matching attributes, found " + tmp.getRank() + " matches");
+			if( this.method.equals("spearman") ) {
+			    tmp.spearmansRankCorrelation(this.threshold);
+			}
+			else if( this.method.equals("kolmogorov") ) {
+			    tmp.kolmogorovSmirnovTest(this.threshold);
+			}
+			else {
+			    throw new RuntimeException("unknown method");
+			}
 
 			// we only select the training data from our set with the most matching attributes
@@ -129,5 +149,5 @@
 			this.classifier.buildClassifier(traindata);
 		}
-		
+
 		public void setMetricMatching(MetricMatch mm) {
 			this.mm = mm;
@@ -400,5 +420,3 @@
 		}
 	 }
-
-
 }
