Index: /branches/ClassificationEnsembleVoting/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/ClassificationEnsembleSolutionConfidenceAccuracyDependence.Designer.cs
===================================================================
--- /branches/ClassificationEnsembleVoting/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/ClassificationEnsembleSolutionConfidenceAccuracyDependence.Designer.cs	(revision 8297)
+++ /branches/ClassificationEnsembleVoting/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/ClassificationEnsembleSolutionConfidenceAccuracyDependence.Designer.cs	(revision 8297)
@@ -0,0 +1,100 @@
+﻿#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
+namespace HeuristicLab.Problems.DataAnalysis.Views {
+  partial class ClassificationEnsembleSolutionConfidenceAccuracyDependence {
+    /// <summary> 
+    /// Required designer variable.
+    /// </summary>
+    private System.ComponentModel.IContainer components = null;
+
+    /// <summary> 
+    /// Clean up any resources being used.
+    /// </summary>
+    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+    protected override void Dispose(bool disposing) {
+      if (disposing && (components != null)) {
+        components.Dispose();
+      }
+      base.Dispose(disposing);
+    }
+
+    #region Component Designer generated code
+
+    /// <summary> 
+    /// Required method for Designer support - do not modify 
+    /// the contents of this method with the code editor.
+    /// </summary>
+    private void InitializeComponent() {
+      System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea1 = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
+      System.Windows.Forms.DataVisualization.Charting.Legend legend1 = new System.Windows.Forms.DataVisualization.Charting.Legend();
+      this.chart = new HeuristicLab.Visualization.ChartControlsExtensions.EnhancedChart();
+      this.SamplesComboBox = new System.Windows.Forms.ComboBox();
+      ((System.ComponentModel.ISupportInitialize)(this.chart)).BeginInit();
+      this.SuspendLayout();
+      // 
+      // chart
+      // 
+      this.chart.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+                  | System.Windows.Forms.AnchorStyles.Left)
+                  | System.Windows.Forms.AnchorStyles.Right)));
+      chartArea1.Name = "ChartArea";
+      this.chart.ChartAreas.Add(chartArea1);
+      legend1.Alignment = System.Drawing.StringAlignment.Center;
+      legend1.Docking = System.Windows.Forms.DataVisualization.Charting.Docking.Top;
+      legend1.Name = "Default";
+      this.chart.Legends.Add(legend1);
+      this.chart.Location = new System.Drawing.Point(0, 30);
+      this.chart.Name = "chart";
+      this.chart.Size = new System.Drawing.Size(358, 195);
+      this.chart.TabIndex = 0;
+      // 
+      // SamplesComboBox
+      // 
+      this.SamplesComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+                  | System.Windows.Forms.AnchorStyles.Right)));
+      this.SamplesComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+      this.SamplesComboBox.FormattingEnabled = true;
+      this.SamplesComboBox.Location = new System.Drawing.Point(3, 3);
+      this.SamplesComboBox.Name = "SamplesComboBox";
+      this.SamplesComboBox.Size = new System.Drawing.Size(355, 21);
+      this.SamplesComboBox.TabIndex = 1;
+      this.SamplesComboBox.SelectedIndexChanged += new System.EventHandler(this.SamplesComboBox_SelectedIndexChanged);
+      // 
+      // ClassificationEnsembleSolutionConfidenceAccuracyDependence
+      // 
+      this.AllowDrop = true;
+      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+      this.Controls.Add(this.SamplesComboBox);
+      this.Controls.Add(this.chart);
+      this.Name = "ClassificationEnsembleSolutionConfidenceAccuracyDependence";
+      this.Size = new System.Drawing.Size(358, 225);
+      ((System.ComponentModel.ISupportInitialize)(this.chart)).EndInit();
+      this.ResumeLayout(false);
+
+    }
+
+    #endregion
+
+    private HeuristicLab.Visualization.ChartControlsExtensions.EnhancedChart chart;
+    private System.Windows.Forms.ComboBox SamplesComboBox;
+  }
+}
Index: /branches/ClassificationEnsembleVoting/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/ClassificationEnsembleSolutionConfidenceAccuracyDependence.cs
===================================================================
--- /branches/ClassificationEnsembleVoting/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/ClassificationEnsembleSolutionConfidenceAccuracyDependence.cs	(revision 8297)
+++ /branches/ClassificationEnsembleVoting/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/ClassificationEnsembleSolutionConfidenceAccuracyDependence.cs	(revision 8297)
@@ -0,0 +1,191 @@
+﻿#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 System.Windows.Forms;
+using System.Windows.Forms.DataVisualization.Charting;
+using HeuristicLab.Data;
+using HeuristicLab.MainForm;
+using HeuristicLab.Problems.DataAnalysis.Interfaces;
+
+namespace HeuristicLab.Problems.DataAnalysis.Views {
+  [View("Confidence Accuracy Dependence")]
+  [Content(typeof(IClassificationEnsembleSolution))]
+  public partial class ClassificationEnsembleSolutionConfidenceAccuracyDependence : DataAnalysisSolutionEvaluationView {
+    private const string CONFIDENCE = "Confidence";
+    private const string ACCURACY = "Accuracy";
+    private const string COVEREDPERCENTAGE = "Covered percentage";
+
+    private const string SamplesComboBoxAllSamples = "All Samples";
+    private const string SamplesComboBoxTrainingSamples = "Training Samples";
+    private const string SamplesComboBoxTestSamples = "Test Samples";
+
+    // zero is also a point
+    private const int maxPoints = 101;
+
+    public new ClassificationEnsembleSolution Content {
+      get { return (ClassificationEnsembleSolution)base.Content; }
+      set { base.Content = value; }
+    }
+
+    public ClassificationEnsembleSolutionConfidenceAccuracyDependence()
+      : base() {
+      InitializeComponent();
+
+      SamplesComboBox.Items.AddRange(new string[] { SamplesComboBoxAllSamples, SamplesComboBoxTrainingSamples, SamplesComboBoxTestSamples });
+      SamplesComboBox.SelectedIndex = 0;
+      //configure axis
+      this.chart.CustomizeAllChartAreas();
+      this.chart.ChartAreas[0].CursorX.IsUserSelectionEnabled = true;
+      this.chart.ChartAreas[0].AxisX.ScaleView.Zoomable = true;
+      this.chart.ChartAreas[0].AxisX.IsStartedFromZero = true;
+      this.chart.ChartAreas[0].AxisX.Minimum = 0;
+      this.chart.ChartAreas[0].AxisX.Maximum = 1;
+
+      this.chart.ChartAreas[0].CursorY.IsUserSelectionEnabled = true;
+      this.chart.ChartAreas[0].AxisY.ScaleView.Zoomable = true;
+      this.chart.ChartAreas[0].AxisY.IsStartedFromZero = true;
+      this.chart.ChartAreas[0].AxisY.Minimum = 0;
+      this.chart.ChartAreas[0].AxisY.Maximum = 1;
+    }
+
+    private void RedrawChart() {
+      this.chart.Series.Clear();
+      if (Content != null) {
+
+        Dictionary<string, double[]> points = new Dictionary<string, double[]>();
+        points.Add(CONFIDENCE, new double[maxPoints]);
+        points.Add(ACCURACY, new double[maxPoints]);
+        points.Add(COVEREDPERCENTAGE, new double[maxPoints]);
+
+        IClassificationEnsembleSolutionWeightCalculator weightCalc = Content.WeightCalculator;
+        var solutions = Content.ClassificationSolutions;
+        double[] estimatedClassValues;
+        double[] classValues;
+        OnlineAccuracyCalculator accuracyCalc = new OnlineAccuracyCalculator();
+
+        int rows;
+        double[] confidences;
+
+        if (SamplesComboBox.SelectedItem.ToString().Equals(SamplesComboBoxAllSamples)) {
+          rows = Content.ProblemData.Dataset.Rows;
+          estimatedClassValues = Content.EstimatedClassValues.ToArray();
+          classValues = Content.ProblemData.Dataset.GetDoubleValues(Content.ProblemData.TargetVariable).ToArray();
+          confidences = weightCalc.GetConfidence(solutions, Enumerable.Range(0, rows), estimatedClassValues).ToArray();
+        } else {
+          IntRange range;
+          if (SamplesComboBox.SelectedItem.ToString().Equals(SamplesComboBoxTrainingSamples)) {
+            range = Content.ProblemData.TrainingPartition;
+            estimatedClassValues = Content.EstimatedTrainingClassValues.ToArray();
+          } else if (SamplesComboBox.SelectedItem.ToString().Equals(SamplesComboBoxTestSamples)) {
+            range = Content.ProblemData.TestPartition;
+            estimatedClassValues = Content.EstimatedTestClassValues.ToArray();
+          } else {
+            return;
+          }
+          rows = range.End - range.Start;
+          classValues = Content.ProblemData.Dataset.GetDoubleValues(Content.ProblemData.TargetVariable)
+                                      .Skip(range.Start).Take(range.End - range.Start).ToArray();
+          confidences = new double[rows];
+          int index;
+          for (int i = 0; i < rows; i++) {
+            index = range.Start + i;
+            confidences[i] = weightCalc.GetConfidence(GetRelevantSolutions(SamplesComboBox.SelectedItem.ToString(), solutions, index),
+                                                      index, estimatedClassValues[i]);
+          }
+        }
+
+        for (int i = 0; i < maxPoints; i++) {
+          double confidenceValue = (1.0 / (maxPoints - 1)) * i;
+          int notCovered = 0;
+
+          for (int j = 0; j < rows; j++) {
+            if (confidences[j] >= confidenceValue) {
+              accuracyCalc.Add(classValues[j], estimatedClassValues[j]);
+            } else {
+              notCovered++;
+            }
+          }
+
+          points[CONFIDENCE][i] = confidenceValue;
+          points[ACCURACY][i] = accuracyCalc.Accuracy;
+          points[COVEREDPERCENTAGE][i] = (double)notCovered / (double)rows;
+          accuracyCalc.Reset();
+        }
+
+        this.chart.Series.Add(CONFIDENCE);
+        this.chart.Series[CONFIDENCE].LegendText = CONFIDENCE;
+        this.chart.Series[CONFIDENCE].ChartType = SeriesChartType.FastLine;
+        this.chart.Series[CONFIDENCE].Points.DataBindXY(points[CONFIDENCE], points[CONFIDENCE]);
+
+        this.chart.Series.Add(ACCURACY);
+        this.chart.Series[ACCURACY].LegendText = ACCURACY;
+        this.chart.Series[ACCURACY].ChartType = SeriesChartType.FastLine;
+        this.chart.Series[ACCURACY].Points.DataBindXY(points[CONFIDENCE], points[ACCURACY]);
+
+        this.chart.Series.Add(COVEREDPERCENTAGE);
+        this.chart.Series[COVEREDPERCENTAGE].LegendText = COVEREDPERCENTAGE;
+        this.chart.Series[COVEREDPERCENTAGE].ChartType = SeriesChartType.FastLine;
+        this.chart.Series[COVEREDPERCENTAGE].Points.DataBindXY(points[CONFIDENCE], points[COVEREDPERCENTAGE]);
+      }
+    }
+
+    protected IEnumerable<IClassificationSolution> GetRelevantSolutions(string samplesSelection, IEnumerable<IClassificationSolution> solutions, int curRow) {
+      if (samplesSelection == SamplesComboBoxAllSamples)
+        return solutions;
+      else if (samplesSelection == SamplesComboBoxTrainingSamples)
+        return solutions.Where(s => s.ProblemData.IsTrainingSample(curRow));
+      else if (samplesSelection == SamplesComboBoxTestSamples)
+        return solutions.Where(s => s.ProblemData.IsTestSample(curRow));
+      else
+        return new List<IClassificationSolution>();
+    }
+
+    #region events
+    protected override void RegisterContentEvents() {
+      base.RegisterContentEvents();
+      Content.ModelChanged += new EventHandler(Content_ModelChanged);
+      Content.ProblemDataChanged += new EventHandler(Content_ProblemDataChanged);
+    }
+    protected override void DeregisterContentEvents() {
+      base.DeregisterContentEvents();
+      Content.ModelChanged -= new EventHandler(Content_ModelChanged);
+      Content.ProblemDataChanged -= new EventHandler(Content_ProblemDataChanged);
+    }
+
+    protected override void OnContentChanged() {
+      base.OnContentChanged();
+      RedrawChart();
+    }
+    private void Content_ProblemDataChanged(object sender, EventArgs e) {
+      RedrawChart();
+    }
+    private void Content_ModelChanged(object sender, EventArgs e) {
+      RedrawChart();
+    }
+    private void SamplesComboBox_SelectedIndexChanged(object sender, EventArgs e) {
+      RedrawChart();
+    }
+    #endregion
+  }
+}
Index: /branches/ClassificationEnsembleVoting/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/ClassificationEnsembleSolutionEstimatedClassValuesView.cs
===================================================================
--- /branches/ClassificationEnsembleVoting/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/ClassificationEnsembleSolutionEstimatedClassValuesView.cs	(revision 8296)
+++ /branches/ClassificationEnsembleVoting/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/ClassificationEnsembleSolutionEstimatedClassValuesView.cs	(revision 8297)
@@ -28,5 +28,5 @@
 using HeuristicLab.MainForm;
 using HeuristicLab.MainForm.WindowsForms;
-using HeuristicLab.Problems.DataAnalysis.Interfaces.Classification;
+using HeuristicLab.Problems.DataAnalysis.Interfaces;
 
 namespace HeuristicLab.Problems.DataAnalysis.Views {
@@ -111,4 +111,9 @@
       double curConfidence;
 
+      double[] confidences = null;
+      if (SamplesComboBox.SelectedItem.ToString() == SamplesComboBoxAllSamples) {
+        confidences = weightCalc.GetConfidence(solutions, indizes, estimatedClassValues).ToArray();
+      }
+
       for (int i = 0; i < indizes.Length; i++) {
         int row = indizes[i];
@@ -120,5 +125,10 @@
           correctClassified = target[i].IsAlmost(estimatedClassValues[i]);
           values[i, 3] = correctClassified.ToString();
-          curConfidence = weightCalc.GetConfidence(solutions, indizes[i], estimatedClassValues[i]);
+          if (SamplesComboBox.SelectedItem.ToString() == SamplesComboBoxAllSamples) {
+            curConfidence = confidences[i];
+          } else {
+            curConfidence = weightCalc.GetConfidence(GetRelevantSolutions(SamplesComboBox.SelectedItem.ToString(), solutions, row),
+                                                     indizes[i], estimatedClassValues[i]);
+          }
           if (correctClassified) {
             confidence[0] += curConfidence;
@@ -156,4 +166,15 @@
       matrix.SortableView = true;
       matrixView.Content = matrix;
+    }
+
+    protected IEnumerable<IClassificationSolution> GetRelevantSolutions(string samplesSelection, IEnumerable<IClassificationSolution> solutions, int curRow) {
+      if (samplesSelection == SamplesComboBoxAllSamples)
+        return solutions;
+      else if (samplesSelection == SamplesComboBoxTrainingSamples)
+        return solutions.Where(s => s.ProblemData.IsTrainingSample(curRow));
+      else if (samplesSelection == SamplesComboBoxTestSamples)
+        return solutions.Where(s => s.ProblemData.IsTestSample(curRow));
+      else
+        return new List<IClassificationSolution>();
     }
 
Index: /branches/ClassificationEnsembleVoting/HeuristicLab.Problems.DataAnalysis.Views/3.4/HeuristicLab.Problems.DataAnalysis.Views-3.4.csproj
===================================================================
--- /branches/ClassificationEnsembleVoting/HeuristicLab.Problems.DataAnalysis.Views/3.4/HeuristicLab.Problems.DataAnalysis.Views-3.4.csproj	(revision 8296)
+++ /branches/ClassificationEnsembleVoting/HeuristicLab.Problems.DataAnalysis.Views/3.4/HeuristicLab.Problems.DataAnalysis.Views-3.4.csproj	(revision 8297)
@@ -154,4 +154,10 @@
       <DependentUpon>ClassificationEnsembleSolutionModelView.cs</DependentUpon>
     </Compile>
+    <Compile Include="Classification\ClassificationEnsembleSolutionConfidenceAccuracyDependence.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="Classification\ClassificationEnsembleSolutionConfidenceAccuracyDependence.Designer.cs">
+      <DependentUpon>ClassificationEnsembleSolutionConfidenceAccuracyDependence.cs</DependentUpon>
+    </Compile>
     <Compile Include="DataAnalysisSolutionEvaluationView.cs">
       <SubType>UserControl</SubType>
Index: /branches/ClassificationEnsembleVoting/HeuristicLab.Problems.DataAnalysis.Views/3.4/Solution Views/ClassificationEnsembleSolutionView.cs
===================================================================
--- /branches/ClassificationEnsembleVoting/HeuristicLab.Problems.DataAnalysis.Views/3.4/Solution Views/ClassificationEnsembleSolutionView.cs	(revision 8296)
+++ /branches/ClassificationEnsembleVoting/HeuristicLab.Problems.DataAnalysis.Views/3.4/Solution Views/ClassificationEnsembleSolutionView.cs	(revision 8297)
@@ -26,5 +26,5 @@
 using HeuristicLab.MainForm;
 using HeuristicLab.PluginInfrastructure;
-using HeuristicLab.Problems.DataAnalysis.Interfaces.Classification;
+using HeuristicLab.Problems.DataAnalysis.Interfaces;
 
 namespace HeuristicLab.Problems.DataAnalysis.Views {
Index: /branches/ClassificationEnsembleVoting/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationEnsembleSolution.cs
===================================================================
--- /branches/ClassificationEnsembleVoting/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationEnsembleSolution.cs	(revision 8296)
+++ /branches/ClassificationEnsembleVoting/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationEnsembleSolution.cs	(revision 8297)
@@ -28,5 +28,5 @@
 using HeuristicLab.Data;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Problems.DataAnalysis.Interfaces.Classification;
+using HeuristicLab.Problems.DataAnalysis.Interfaces;
 
 namespace HeuristicLab.Problems.DataAnalysis {
Index: /branches/ClassificationEnsembleVoting/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/WeightCalculators/AverageThresholdCalculator.cs
===================================================================
--- /branches/ClassificationEnsembleVoting/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/WeightCalculators/AverageThresholdCalculator.cs	(revision 8296)
+++ /branches/ClassificationEnsembleVoting/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/WeightCalculators/AverageThresholdCalculator.cs	(revision 8297)
@@ -66,4 +66,25 @@
         return double.NaN;
       double avg = values.Average();
+      return GetAverageConfidence(avg, estimatedClassValue);
+    }
+
+    public override IEnumerable<double> GetDiscriminantConfidence(IEnumerable<IDiscriminantFunctionClassificationSolution> solutions, IEnumerable<int> indices, IEnumerable<double> estimatedClassValue) {
+      if (!classValues.Count().Equals(2))
+        return Enumerable.Repeat(double.NaN, indices.Count());
+
+      Dataset dataset = solutions.First().ProblemData.Dataset;
+      double[][] values = solutions.Select(s => s.Model.GetEstimatedValues(dataset, indices).ToArray()).ToArray();
+      double[] confidences = new double[indices.Count()];
+      double[] estimatedClassValueArr = estimatedClassValue.ToArray();
+
+      for (int i = 0; i < indices.Count(); i++) {
+        double avg = values.Select(x => x[i]).Average();
+        confidences[i] = GetAverageConfidence(avg, estimatedClassValueArr[i]);
+      }
+
+      return confidences;
+    }
+
+    protected double GetAverageConfidence(double avg, double estimatedClassValue) {
       if (estimatedClassValue.Equals(classValues[0])) {
         if (avg < estimatedClassValue)
Index: /branches/ClassificationEnsembleVoting/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/WeightCalculators/ClassificationWeightCalculator.cs
===================================================================
--- /branches/ClassificationEnsembleVoting/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/WeightCalculators/ClassificationWeightCalculator.cs	(revision 8296)
+++ /branches/ClassificationEnsembleVoting/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/WeightCalculators/ClassificationWeightCalculator.cs	(revision 8297)
@@ -26,5 +26,5 @@
 using HeuristicLab.Data;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Problems.DataAnalysis.Interfaces.Classification;
+using HeuristicLab.Problems.DataAnalysis.Interfaces;
 
 namespace HeuristicLab.Problems.DataAnalysis {
@@ -124,4 +124,22 @@
     }
 
+    public virtual IEnumerable<double> GetConfidence(IEnumerable<IClassificationSolution> solutions, IEnumerable<int> indices, IEnumerable<double> estimatedClassValue) {
+      if (solutions.Count() < 1)
+        return Enumerable.Repeat(double.NaN, indices.Count());
+
+      Dataset dataset = solutions.First().ProblemData.Dataset;
+      Dictionary<IClassificationSolution, double[]> solValues = solutions.ToDictionary(x => x, x => x.Model.GetEstimatedClassValues(dataset, indices).ToArray());
+      double[] estimatedClassValueArr = estimatedClassValue.ToArray();
+      double[] confidences = new double[indices.Count()];
+
+      for (int i = 0; i < indices.Count(); i++) {
+        var correctSolutions = solValues.Where(x => DoubleExtensions.IsAlmost(x.Value[i], estimatedClassValueArr[i]));
+        confidences[i] = (from sol in correctSolutions
+                          select weights[sol.Key]).Sum();
+      }
+
+      return confidences;
+    }
+
     #region Helper
     protected IEnumerable<double> GetValues(IList<double> targetValues, IEnumerable<int> indizes) {
Index: /branches/ClassificationEnsembleVoting/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/WeightCalculators/DiscriminantClassificationWeightCalculator.cs
===================================================================
--- /branches/ClassificationEnsembleVoting/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/WeightCalculators/DiscriminantClassificationWeightCalculator.cs	(revision 8296)
+++ /branches/ClassificationEnsembleVoting/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/WeightCalculators/DiscriminantClassificationWeightCalculator.cs	(revision 8297)
@@ -24,5 +24,5 @@
 using HeuristicLab.Common;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Problems.DataAnalysis.Interfaces.Classification;
+using HeuristicLab.Problems.DataAnalysis.Interfaces;
 
 namespace HeuristicLab.Problems.DataAnalysis {
@@ -95,4 +95,17 @@
       return base.GetConfidence(solutions, index, estimatedClassValue);
     }
+
+    public sealed override IEnumerable<double> GetConfidence(IEnumerable<IClassificationSolution> solutions, IEnumerable<int> indices, IEnumerable<double> estimatedClassValue) {
+      if (solutions.Count() < 1 || !solutions.All(x => x is IDiscriminantFunctionClassificationSolution))
+        return Enumerable.Repeat(double.NaN, indices.Count());
+
+      IEnumerable<IDiscriminantFunctionClassificationSolution> discriminantSolutions = solutions.Cast<IDiscriminantFunctionClassificationSolution>();
+
+      return GetDiscriminantConfidence(discriminantSolutions, indices, estimatedClassValue);
+    }
+
+    public virtual IEnumerable<double> GetDiscriminantConfidence(IEnumerable<IDiscriminantFunctionClassificationSolution> solutions, IEnumerable<int> indices, IEnumerable<double> estimatedClassValue) {
+      return base.GetConfidence(solutions, indices, estimatedClassValue);
+    }
   }
 }
Index: /branches/ClassificationEnsembleVoting/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/WeightCalculators/MajorityVoteWeightCalculator.cs
===================================================================
--- /branches/ClassificationEnsembleVoting/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/WeightCalculators/MajorityVoteWeightCalculator.cs	(revision 8296)
+++ /branches/ClassificationEnsembleVoting/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/WeightCalculators/MajorityVoteWeightCalculator.cs	(revision 8297)
@@ -61,4 +61,21 @@
       return ((double)correctEstimated / (double)solutions.Count() - 0.5) * 2;
     }
+
+    public override IEnumerable<double> GetConfidence(IEnumerable<IClassificationSolution> solutions, IEnumerable<int> indices, IEnumerable<double> estimatedClassValue) {
+      if (solutions.Count() < 1)
+        return Enumerable.Repeat(double.NaN, indices.Count());
+      Dataset dataset = solutions.First().ProblemData.Dataset;
+      var estimationsPerSolution = solutions.Select(s => s.Model.GetEstimatedClassValues(dataset, indices).ToArray()).ToArray();
+      double[] estimatedClassValueArr = estimatedClassValue.ToArray();
+      double correctEstimated;
+      double[] confidences = new double[indices.Count()];
+
+      for (int i = 0; i < indices.Count(); i++) {
+        correctEstimated = estimationsPerSolution.Where(x => DoubleExtensions.IsAlmost(x[i], estimatedClassValueArr[i])).Count();
+        confidences[i] = (correctEstimated / (double)solutions.Count() - 0.5) * 2;
+      }
+
+      return confidences;
+    }
   }
 }
Index: /branches/ClassificationEnsembleVoting/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/WeightCalculators/MedianThresholdCalculator.cs
===================================================================
--- /branches/ClassificationEnsembleVoting/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/WeightCalculators/MedianThresholdCalculator.cs	(revision 8296)
+++ /branches/ClassificationEnsembleVoting/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/WeightCalculators/MedianThresholdCalculator.cs	(revision 8297)
@@ -66,4 +66,25 @@
         return double.NaN;
       double median = GetMedian(values);
+      return GetMedianConfidence(median, estimatedClassValue);
+    }
+
+    public override IEnumerable<double> GetDiscriminantConfidence(IEnumerable<IDiscriminantFunctionClassificationSolution> solutions, IEnumerable<int> indices, IEnumerable<double> estimatedClassValue) {
+      if (!classValues.Count().Equals(2))
+        return Enumerable.Repeat(double.NaN, indices.Count());
+
+      Dataset dataset = solutions.First().ProblemData.Dataset;
+      double[][] values = solutions.Select(s => s.Model.GetEstimatedValues(dataset, indices).ToArray()).ToArray();
+      double[] confidences = new double[indices.Count()];
+      double[] estimatedClassValueArr = estimatedClassValue.ToArray();
+
+      for (int i = 0; i < indices.Count(); i++) {
+        double avg = values.Select(x => x[i]).Average();
+        confidences[i] = GetMedianConfidence(avg, estimatedClassValueArr[i]);
+      }
+
+      return confidences;
+    }
+
+    protected double GetMedianConfidence(double median, double estimatedClassValue) {
       if (estimatedClassValue.Equals(classValues[0])) {
         if (median < estimatedClassValue)
Index: /branches/ClassificationEnsembleVoting/HeuristicLab.Problems.DataAnalysis/3.4/Interfaces/Classification/IClassificationEnsembleSolutionWeightCalculator.cs
===================================================================
--- /branches/ClassificationEnsembleVoting/HeuristicLab.Problems.DataAnalysis/3.4/Interfaces/Classification/IClassificationEnsembleSolutionWeightCalculator.cs	(revision 8296)
+++ /branches/ClassificationEnsembleVoting/HeuristicLab.Problems.DataAnalysis/3.4/Interfaces/Classification/IClassificationEnsembleSolutionWeightCalculator.cs	(revision 8297)
@@ -23,5 +23,5 @@
 using HeuristicLab.Core;
 
-namespace HeuristicLab.Problems.DataAnalysis.Interfaces.Classification {
+namespace HeuristicLab.Problems.DataAnalysis.Interfaces {
   public delegate bool CheckPoint(IClassificationProblemData problemData, int point);
 
@@ -30,4 +30,5 @@
     IEnumerable<double> AggregateEstimatedClassValues(IEnumerable<IClassificationSolution> solutions, Dataset dataset, IEnumerable<int> rows, CheckPoint handler);
     double GetConfidence(IEnumerable<IClassificationSolution> solutions, int index, double estimatedClassValue);
+    IEnumerable<double> GetConfidence(IEnumerable<IClassificationSolution> solutions, IEnumerable<int> indices, IEnumerable<double> estimatedClassValue);
 
     CheckPoint GetTestClassDelegate();
