Index: trunk/sources/HeuristicLab.Modeling/3.2/ModelingResultCalculators.cs
===================================================================
--- trunk/sources/HeuristicLab.Modeling/3.2/ModelingResultCalculators.cs	(revision 2383)
+++ trunk/sources/HeuristicLab.Modeling/3.2/ModelingResultCalculators.cs	(revision 2386)
@@ -27,59 +27,80 @@
 namespace HeuristicLab.Modeling {
   public abstract class ModelingResultCalculators {
-
-    public static readonly Dictionary<ModelingResult, Func<double[,], double>> Mapping;
+    private static readonly Dictionary<ModelingResult, Func<double[,], double>> ClassificationModelingResults;
+    private static readonly Dictionary<ModelingResult, Func<double[,], double>> RegressionModelingResults;
+    private static readonly Dictionary<ModelingResult, Func<double[,], double>> TimeSeriesPrognosisModelingResults;
 
     static ModelingResultCalculators() {
-      Mapping = new Dictionary<ModelingResult, Func<double[,], double>>();
+      RegressionModelingResults = new Dictionary<ModelingResult, Func<double[,], double>>();
 
       //Mean squared errors
-      Mapping[ModelingResult.TrainingMeanSquaredError] = SimpleMSEEvaluator.Calculate;
-      Mapping[ModelingResult.ValidationMeanSquaredError] = SimpleMSEEvaluator.Calculate;
-      Mapping[ModelingResult.TestMeanSquaredError] = SimpleMSEEvaluator.Calculate;
+      RegressionModelingResults[ModelingResult.TrainingMeanSquaredError] = SimpleMSEEvaluator.Calculate;
+      RegressionModelingResults[ModelingResult.ValidationMeanSquaredError] = SimpleMSEEvaluator.Calculate;
+      RegressionModelingResults[ModelingResult.TestMeanSquaredError] = SimpleMSEEvaluator.Calculate;
 
       //Normalized mean squared errors
-      Mapping[ModelingResult.TrainingNormalizedMeanSquaredError] = SimpleNMSEEvaluator.Calculate;
-      Mapping[ModelingResult.ValidationNormalizedMeanSquaredError] = SimpleNMSEEvaluator.Calculate;
-      Mapping[ModelingResult.TestNormalizedMeanSquaredError] = SimpleNMSEEvaluator.Calculate;
+      RegressionModelingResults[ModelingResult.TrainingNormalizedMeanSquaredError] = SimpleNMSEEvaluator.Calculate;
+      RegressionModelingResults[ModelingResult.ValidationNormalizedMeanSquaredError] = SimpleNMSEEvaluator.Calculate;
+      RegressionModelingResults[ModelingResult.TestNormalizedMeanSquaredError] = SimpleNMSEEvaluator.Calculate;
 
       //Mean absolute percentage error
-      Mapping[ModelingResult.TrainingMeanAbsolutePercentageError] = SimpleMeanAbsolutePercentageErrorEvaluator.Calculate;
-      Mapping[ModelingResult.ValidationMeanAbsolutePercentageError] = SimpleMeanAbsolutePercentageErrorEvaluator.Calculate;
-      Mapping[ModelingResult.TestMeanAbsolutePercentageError] = SimpleMeanAbsolutePercentageErrorEvaluator.Calculate;
+      RegressionModelingResults[ModelingResult.TrainingMeanAbsolutePercentageError] = SimpleMeanAbsolutePercentageErrorEvaluator.Calculate;
+      RegressionModelingResults[ModelingResult.ValidationMeanAbsolutePercentageError] = SimpleMeanAbsolutePercentageErrorEvaluator.Calculate;
+      RegressionModelingResults[ModelingResult.TestMeanAbsolutePercentageError] = SimpleMeanAbsolutePercentageErrorEvaluator.Calculate;
 
       //Mean absolute percentage of range error
-      Mapping[ModelingResult.TrainingMeanAbsolutePercentageOfRangeError] = SimpleMeanAbsolutePercentageOfRangeErrorEvaluator.Calculate;
-      Mapping[ModelingResult.ValidationMeanAbsolutePercentageOfRangeError] = SimpleMeanAbsolutePercentageOfRangeErrorEvaluator.Calculate;
-      Mapping[ModelingResult.TestMeanAbsolutePercentageOfRangeError] = SimpleMeanAbsolutePercentageOfRangeErrorEvaluator.Calculate;
+      RegressionModelingResults[ModelingResult.TrainingMeanAbsolutePercentageOfRangeError] = SimpleMeanAbsolutePercentageOfRangeErrorEvaluator.Calculate;
+      RegressionModelingResults[ModelingResult.ValidationMeanAbsolutePercentageOfRangeError] = SimpleMeanAbsolutePercentageOfRangeErrorEvaluator.Calculate;
+      RegressionModelingResults[ModelingResult.TestMeanAbsolutePercentageOfRangeError] = SimpleMeanAbsolutePercentageOfRangeErrorEvaluator.Calculate;
 
       //Coefficient of determination
-      Mapping[ModelingResult.TrainingCoefficientOfDetermination] = SimpleR2Evaluator.Calculate;
-      Mapping[ModelingResult.ValidationCoefficientOfDetermination] = SimpleR2Evaluator.Calculate;
-      Mapping[ModelingResult.TestCoefficientOfDetermination] = SimpleR2Evaluator.Calculate;
+      RegressionModelingResults[ModelingResult.TrainingCoefficientOfDetermination] = SimpleR2Evaluator.Calculate;
+      RegressionModelingResults[ModelingResult.ValidationCoefficientOfDetermination] = SimpleR2Evaluator.Calculate;
+      RegressionModelingResults[ModelingResult.TestCoefficientOfDetermination] = SimpleR2Evaluator.Calculate;
 
       //Variance accounted for
-      Mapping[ModelingResult.TrainingVarianceAccountedFor] = SimpleVarianceAccountedForEvaluator.Calculate;
-      Mapping[ModelingResult.ValidationVarianceAccountedFor] = SimpleVarianceAccountedForEvaluator.Calculate;
-      Mapping[ModelingResult.TestVarianceAccountedFor] = SimpleVarianceAccountedForEvaluator.Calculate;
+      RegressionModelingResults[ModelingResult.TrainingVarianceAccountedFor] = SimpleVarianceAccountedForEvaluator.Calculate;
+      RegressionModelingResults[ModelingResult.ValidationVarianceAccountedFor] = SimpleVarianceAccountedForEvaluator.Calculate;
+      RegressionModelingResults[ModelingResult.TestVarianceAccountedFor] = SimpleVarianceAccountedForEvaluator.Calculate;
 
       //Accuracy
-      Mapping[ModelingResult.TrainingAccuracy] = SimpleAccuracyEvaluator.Calculate;
-      Mapping[ModelingResult.ValidationAccuracy] = SimpleAccuracyEvaluator.Calculate;
-      Mapping[ModelingResult.TestAccuracy] = SimpleAccuracyEvaluator.Calculate;
+      ClassificationModelingResults[ModelingResult.TrainingAccuracy] = SimpleAccuracyEvaluator.Calculate;
+      ClassificationModelingResults[ModelingResult.ValidationAccuracy] = SimpleAccuracyEvaluator.Calculate;
+      ClassificationModelingResults[ModelingResult.TestAccuracy] = SimpleAccuracyEvaluator.Calculate;
 
       //Theil inequality
-      Mapping[ModelingResult.TrainingTheilInequality] = SimpleTheilInequalityCoefficientEvaluator.Calculate;
-      Mapping[ModelingResult.ValidationTheilInequality] = SimpleTheilInequalityCoefficientEvaluator.Calculate;
-      Mapping[ModelingResult.TestTheilInequality] = SimpleTheilInequalityCoefficientEvaluator.Calculate;
+      TimeSeriesPrognosisModelingResults[ModelingResult.TrainingTheilInequality] = SimpleTheilInequalityCoefficientEvaluator.Calculate;
+      TimeSeriesPrognosisModelingResults[ModelingResult.ValidationTheilInequality] = SimpleTheilInequalityCoefficientEvaluator.Calculate;
+      TimeSeriesPrognosisModelingResults[ModelingResult.TestTheilInequality] = SimpleTheilInequalityCoefficientEvaluator.Calculate;
 
       //Directional symmetry
-      Mapping[ModelingResult.TrainingDirectionalSymmetry] = SimpleDirectionalSymmetryEvaluator.Calculate;
-      Mapping[ModelingResult.ValidationDirectionalSymmetry] = SimpleDirectionalSymmetryEvaluator.Calculate;
-      Mapping[ModelingResult.TestDirectionalSymmetry] = SimpleDirectionalSymmetryEvaluator.Calculate;
+      TimeSeriesPrognosisModelingResults[ModelingResult.TrainingDirectionalSymmetry] = SimpleDirectionalSymmetryEvaluator.Calculate;
+      TimeSeriesPrognosisModelingResults[ModelingResult.ValidationDirectionalSymmetry] = SimpleDirectionalSymmetryEvaluator.Calculate;
+      TimeSeriesPrognosisModelingResults[ModelingResult.TestDirectionalSymmetry] = SimpleDirectionalSymmetryEvaluator.Calculate;
 
       //Weighted directional symmetry
-      Mapping[ModelingResult.TrainingWeightedDirectionalSymmetry] = SimpleWeightedDirectionalSymmetryEvaluator.Calculate;
-      Mapping[ModelingResult.ValidationWeightedDirectionalSymmetry] = SimpleWeightedDirectionalSymmetryEvaluator.Calculate;
-      Mapping[ModelingResult.TestWeightedDirectionalSymmetry] = SimpleWeightedDirectionalSymmetryEvaluator.Calculate;
+      TimeSeriesPrognosisModelingResults[ModelingResult.TrainingWeightedDirectionalSymmetry] = SimpleWeightedDirectionalSymmetryEvaluator.Calculate;
+      TimeSeriesPrognosisModelingResults[ModelingResult.ValidationWeightedDirectionalSymmetry] = SimpleWeightedDirectionalSymmetryEvaluator.Calculate;
+      TimeSeriesPrognosisModelingResults[ModelingResult.TestWeightedDirectionalSymmetry] = SimpleWeightedDirectionalSymmetryEvaluator.Calculate;
+    }
+
+    public static Dictionary<ModelingResult, Func<double[,], double>> GetModelingResult(ModelType modelType) {
+      IEnumerable<KeyValuePair<ModelingResult,Func<double[,],double>>> ret = new Dictionary<ModelingResult,Func<double[,],double>>();
+      switch (modelType) {
+        case ModelType.Regression:
+          ret = ret.Union( RegressionModelingResults);
+          break;
+        case ModelType.Classification:
+          ret = ret.Union(RegressionModelingResults);
+          ret = ret.Union(ClassificationModelingResults);
+          break;
+        case ModelType.TimeSeriesPrognosis:
+          ret = ret.Union(RegressionModelingResults);
+          ret = ret.Union(TimeSeriesPrognosisModelingResults);
+          break;
+        default:
+          throw new ArgumentException("Modeling result mapping for ModelType " + modelType + " not defined.");          
+      }
+      return ret.ToDictionary<KeyValuePair<ModelingResult, Func<double[,], double>>, ModelingResult, Func<double[,], double>>(x => x.Key, x => x.Value);
     }
   }
