Index: /branches/ClassificationEnsembleVoting/HeuristicLab.Problems.DataAnalysis.Views/3.4/Solution Views/DiscriminantFunctionClassificationSolutionView.cs
===================================================================
--- /branches/ClassificationEnsembleVoting/HeuristicLab.Problems.DataAnalysis.Views/3.4/Solution Views/DiscriminantFunctionClassificationSolutionView.cs	(revision 7490)
+++ /branches/ClassificationEnsembleVoting/HeuristicLab.Problems.DataAnalysis.Views/3.4/Solution Views/DiscriminantFunctionClassificationSolutionView.cs	(revision 7491)
@@ -24,5 +24,5 @@
 namespace HeuristicLab.Problems.DataAnalysis.Views {
   [View("ClassificationSolution View")]
-  [Content(typeof(DiscriminantFunctionClassificationSolutionBase), true)]
+  [Content(typeof(DiscriminantFunctionClassificationSolutionBase), false)]
   public partial class DiscriminantFunctionClassificationSolutionView : ClassificationSolutionView {
     public DiscriminantFunctionClassificationSolutionView() {
Index: /branches/ClassificationEnsembleVoting/HeuristicLab.Problems.DataAnalysis/3.4/HeuristicLab.Problems.DataAnalysis-3.4.csproj
===================================================================
--- /branches/ClassificationEnsembleVoting/HeuristicLab.Problems.DataAnalysis/3.4/HeuristicLab.Problems.DataAnalysis-3.4.csproj	(revision 7490)
+++ /branches/ClassificationEnsembleVoting/HeuristicLab.Problems.DataAnalysis/3.4/HeuristicLab.Problems.DataAnalysis-3.4.csproj	(revision 7491)
@@ -129,5 +129,6 @@
     <Compile Include="Implementation\Classification\DiscriminantFunctionClassificationSolutionBase.cs" />
     <Compile Include="Implementation\Classification\WeightCalculators\AccuracyWeightCalculator.cs" />
-    <Compile Include="Implementation\Classification\WeightCalculators\AdaBoostWeightCalculator.cs" />
+    <Compile Include="Implementation\Classification\WeightCalculators\NeighbourhoodWeightCalculator.cs" />
+    <Compile Include="Implementation\Classification\WeightCalculators\PointCertaintyWeightCalculator.cs" />
     <Compile Include="Implementation\Classification\WeightCalculators\MajorityVoteWeightCalculator.cs" />
     <Compile Include="Implementation\Classification\WeightCalculators\WeightCalculator.cs" />
Index: anches/ClassificationEnsembleVoting/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/WeightCalculators/AdaBoostWeightCalculator.cs
===================================================================
--- /branches/ClassificationEnsembleVoting/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/WeightCalculators/AdaBoostWeightCalculator.cs	(revision 7490)
+++ 	(revision )
@@ -1,94 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-
-namespace HeuristicLab.Problems.DataAnalysis {
-  /// <summary>
-  /// Represents a weight calculator that gives every classification solution a weight based on the AdaBoost algorithm.
-  /// </summary>
-  [StorableClass]
-  [Item("AdaBoostWeightCalculator", "Represents a weight calculator that gives every classification solution a weight based on the AdaBoost algorithm.")]
-  public class AdaBoostWeightCalculator : WeightCalculator {
-
-    public AdaBoostWeightCalculator()
-      : base() {
-    }
-
-    [StorableConstructor]
-    protected AdaBoostWeightCalculator(bool deserializing) : base(deserializing) { }
-    protected AdaBoostWeightCalculator(AdaBoostWeightCalculator original, Cloner cloner)
-      : base(original, cloner) {
-    }
-
-    public override IDeepCloneable Clone(Cloner cloner) {
-      return new AdaBoostWeightCalculator(this, cloner);
-    }
-
-    public override IEnumerable<double> CalculateWeights(ItemCollection<IClassificationSolution> classificationSolutions) {
-      if (classificationSolutions.Count <= 0)
-        return new List<double>();
-      IClassificationProblemData problemData = classificationSolutions.ElementAt(0).ProblemData;
-      double normalize = problemData.TrainingIndizes.Count() + problemData.TestIndizes.Count();
-      List<double> distribution = Enumerable.Repeat(1.0 / normalize, Convert.ToInt32(normalize)).ToList();
-      IEnumerable<double> targetValues = problemData.Dataset.GetDoubleValues(problemData.TargetVariable);
-
-      List<double> weights = new List<double>();
-      foreach (var solution in classificationSolutions) {
-        double error = 0.0;
-        //calculate the error
-
-        //TODO: only works if training and test partition are not overlapping (has to be changed)
-        IEnumerable<double> training = targetValues.Skip(problemData.TrainingPartition.Start).Take(problemData.TrainingIndizes.Count());
-        IEnumerable<double> test = targetValues.Skip(problemData.TestPartition.Start).Take(problemData.TestIndizes.Count());
-
-        IList<double> original = training.Concat(test).ToList();
-        IList<double> estimated = solution.EstimatedTrainingClassValues.Concat(solution.EstimatedTestClassValues).ToList();
-
-        for (int i = 0; i < original.Count; i++) {
-          if (!original[i].Equals(estimated[i]))
-            error += distribution[i];
-        }
-        //if the error is too big, the solution is not taken into account (weight would be negative)
-        if (error > 0.5) {
-          weights.Add(0);
-          continue;
-        }
-        double beta = error / (1 - error);
-        weights.Add(Math.Log(1 / beta));
-        //Update the distribution
-        normalize = 0.0;
-        for (int i = 0; i < original.Count; i++) {
-          if (original[i].Equals(estimated[i]))
-            distribution[i] *= beta;
-          normalize += distribution[i];
-        }
-        distribution = distribution.Select(x => x / normalize).ToList();
-      }
-      return weights;
-    }
-  }
-}
Index: /branches/ClassificationEnsembleVoting/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/WeightCalculators/NeighbourhoodWeightCalculator.cs
===================================================================
--- /branches/ClassificationEnsembleVoting/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/WeightCalculators/NeighbourhoodWeightCalculator.cs	(revision 7491)
+++ /branches/ClassificationEnsembleVoting/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/WeightCalculators/NeighbourhoodWeightCalculator.cs	(revision 7491)
@@ -0,0 +1,101 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.DataAnalysis {
+  /// <summary>
+  /// 
+  /// </summary>
+  [StorableClass]
+  [Item("NeighbourhoodWeightCalculator", "")]
+  public class NeighbourhoodWeightCalculator : WeightCalculator {
+
+    public NeighbourhoodWeightCalculator()
+      : base() {
+    }
+
+    [StorableConstructor]
+    protected NeighbourhoodWeightCalculator(bool deserializing) : base(deserializing) { }
+    protected NeighbourhoodWeightCalculator(NeighbourhoodWeightCalculator original, Cloner cloner)
+      : base(original, cloner) {
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new NeighbourhoodWeightCalculator(this, cloner);
+    }
+
+    public override IEnumerable<double> CalculateWeights(ItemCollection<IClassificationSolution> classificationSolutions) {
+      if (classificationSolutions.Count <= 0)
+        return new List<double>();
+
+      if (!classificationSolutions.All(x => x is IDiscriminantFunctionClassificationSolution))
+        return Enumerable.Repeat<double>(1, classificationSolutions.Count);
+
+      ItemCollection<IDiscriminantFunctionClassificationSolution> discriminantSolutions = new ItemCollection<IDiscriminantFunctionClassificationSolution>();
+      List<List<double>> estimatedTestValEnumerators = new List<List<double>>();
+      List<List<double>> estimatedTestClassValEnumerators = new List<List<double>>();
+      foreach (var solution in classificationSolutions) {
+        discriminantSolutions.Add((IDiscriminantFunctionClassificationSolution)solution);
+        estimatedTestValEnumerators.Add(discriminantSolutions.Last().EstimatedTestValues.ToList());
+        estimatedTestClassValEnumerators.Add(discriminantSolutions.Last().EstimatedTestClassValues.ToList());
+      }
+
+      List<double> weights = Enumerable.Repeat<double>(0, classificationSolutions.Count()).ToList<double>();
+
+      IClassificationProblemData problemData = classificationSolutions.ElementAt(0).ProblemData;
+      IList<double> targetValues = problemData.Dataset.GetDoubleValues(problemData.TargetVariable).ToList();
+      List<double> testVal = GetValues(targetValues, problemData.TestIndizes).ToList();
+
+      double pointAvg, help;
+      int count;
+      for (int point = 0; point < estimatedTestClassValEnumerators.First().Count; point++) {
+        pointAvg = 0.0;
+        count = 0;
+        for (int solution = 0; solution < estimatedTestClassValEnumerators.Count; solution++) {
+          if (estimatedTestClassValEnumerators[solution][point].Equals(testVal[point])) {
+            pointAvg += estimatedTestValEnumerators[solution][point];
+            count++;
+          }
+        }
+        pointAvg /= (double)count;
+        for (int solution = 0; solution < estimatedTestClassValEnumerators.Count; solution++) {
+          if (estimatedTestClassValEnumerators[solution][point].Equals(testVal[point])) {
+            weights[solution] += 0.5;
+            help = Math.Abs(estimatedTestValEnumerators[solution][point] - 0.5);
+            weights[solution] += help < 0.5 ? 0.5 - help : 0.0;
+          }
+        }
+      }
+      return weights.Select(x => x / weights.Sum());
+    }
+
+    private IEnumerable<double> GetValues(IList<double> targetValues, IEnumerable<int> indizes) {
+      return from i in indizes
+             select targetValues[i];
+    }
+  }
+}
Index: /branches/ClassificationEnsembleVoting/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/WeightCalculators/PointCertaintyWeightCalculator.cs
===================================================================
--- /branches/ClassificationEnsembleVoting/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/WeightCalculators/PointCertaintyWeightCalculator.cs	(revision 7491)
+++ /branches/ClassificationEnsembleVoting/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/WeightCalculators/PointCertaintyWeightCalculator.cs	(revision 7491)
@@ -0,0 +1,97 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.DataAnalysis {
+  /// <summary>
+  /// 
+  /// </summary>
+  [StorableClass]
+  [Item("PointCertaintyWeightCalculator", "")]
+  public class PointCertaintyWeightCalculator : WeightCalculator {
+
+    public PointCertaintyWeightCalculator()
+      : base() {
+    }
+
+    [StorableConstructor]
+    protected PointCertaintyWeightCalculator(bool deserializing) : base(deserializing) { }
+    protected PointCertaintyWeightCalculator(PointCertaintyWeightCalculator original, Cloner cloner)
+      : base(original, cloner) {
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new PointCertaintyWeightCalculator(this, cloner);
+    }
+
+    public override IEnumerable<double> CalculateWeights(ItemCollection<IClassificationSolution> classificationSolutions) {
+      if (classificationSolutions.Count <= 0)
+        return new List<double>();
+
+      if (!classificationSolutions.All(x => x is IDiscriminantFunctionClassificationSolution))
+        return Enumerable.Repeat<double>(1, classificationSolutions.Count);
+
+      ItemCollection<IDiscriminantFunctionClassificationSolution> discriminantSolutions = new ItemCollection<IDiscriminantFunctionClassificationSolution>();
+      foreach (var solution in classificationSolutions) {
+        discriminantSolutions.Add((IDiscriminantFunctionClassificationSolution)solution);
+      }
+
+      List<double> weights = new List<double>();
+
+      IClassificationProblemData problemData = classificationSolutions.ElementAt(0).ProblemData;
+      IList<double> targetValues = problemData.Dataset.GetDoubleValues(problemData.TargetVariable).ToList();
+      IEnumerator<double> testVal;
+
+      double avg = problemData.ClassValues.Average();
+
+      foreach (var solution in discriminantSolutions) {
+        IEnumerator<double> estimatedTest = solution.EstimatedTestValues.GetEnumerator();
+        IEnumerator<double> estimatedTestClass = solution.EstimatedTestClassValues.GetEnumerator();
+
+        testVal = GetValues(targetValues, problemData.TestIndizes).GetEnumerator();
+        double curWeight = 0.0;
+        while (estimatedTest.MoveNext() && estimatedTestClass.MoveNext() && testVal.MoveNext()) {
+          if (estimatedTestClass.Current.Equals(testVal.Current)) {
+            curWeight += 0.5;
+            double distanceToPoint = Math.Abs(estimatedTest.Current - avg);
+            double distanceToClass = Math.Abs(testVal.Current - avg);
+            if (testVal.Current > avg && estimatedTest.Current > avg
+             || testVal.Current < avg && estimatedTest.Current < avg)
+              curWeight += distanceToPoint < distanceToClass ? (0.5 / distanceToClass) * distanceToPoint : 0.5;
+          }
+        }
+        weights.Add(curWeight);
+      }
+      return weights.Select(x => x / weights.Sum());
+    }
+
+    private IEnumerable<double> GetValues(IList<double> targetValues, IEnumerable<int> indizes) {
+      return from i in indizes
+             select targetValues[i];
+    }
+  }
+}
