Index: /branches/DataAnalysis Refactoring/HeuristicLab.Algorithms.DataAnalysis/3.4/Linear/LinearDiscriminantAnalysis.cs
===================================================================
--- /branches/DataAnalysis Refactoring/HeuristicLab.Algorithms.DataAnalysis/3.4/Linear/LinearDiscriminantAnalysis.cs	(revision 5663)
+++ /branches/DataAnalysis Refactoring/HeuristicLab.Algorithms.DataAnalysis/3.4/Linear/LinearDiscriminantAnalysis.cs	(revision 5664)
@@ -79,5 +79,5 @@
       // change class values into class index
       int targetVariableColumn = inputMatrix.GetLength(1) - 1;
-      List<double> classValues = problemData.ClassValues.OrderBy(x=>x).ToList();
+      List<double> classValues = problemData.ClassValues.OrderBy(x => x).ToList();
       for (int row = 0; row < inputMatrix.GetLength(0); row++) {
         inputMatrix[row, targetVariableColumn] = classValues.IndexOf(inputMatrix[row, targetVariableColumn]);
Index: /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/ClassificationSolutionConfusionMatrixView.Designer.cs
===================================================================
--- /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/ClassificationSolutionConfusionMatrixView.Designer.cs	(revision 5664)
+++ /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/ClassificationSolutionConfusionMatrixView.Designer.cs	(revision 5664)
@@ -0,0 +1,86 @@
+﻿namespace HeuristicLab.Problems.DataAnalysis.Classification.Views {
+  partial class ClassificationSolutionConfusionMatrixView {
+    /// <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() {
+      this.dataGridView = new System.Windows.Forms.DataGridView();
+      this.cmbSamples = new System.Windows.Forms.ComboBox();
+      this.label1 = new System.Windows.Forms.Label();
+      ((System.ComponentModel.ISupportInitialize)(this.dataGridView)).BeginInit();
+      this.SuspendLayout();
+      // 
+      // dataGridView
+      // 
+      this.dataGridView.AllowUserToAddRows = false;
+      this.dataGridView.AllowUserToDeleteRows = false;
+      this.dataGridView.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)));
+      this.dataGridView.Location = new System.Drawing.Point(3, 30);
+      this.dataGridView.Name = "dataGridView";
+      this.dataGridView.ReadOnly = true;
+      this.dataGridView.Size = new System.Drawing.Size(303, 197);
+      this.dataGridView.TabIndex = 0;
+      // 
+      // cmbSamples
+      // 
+      this.cmbSamples.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+      this.cmbSamples.FormattingEnabled = true;
+      this.cmbSamples.Location = new System.Drawing.Point(56, 3);
+      this.cmbSamples.Name = "cmbSamples";
+      this.cmbSamples.Size = new System.Drawing.Size(121, 21);
+      this.cmbSamples.TabIndex = 1;
+      this.cmbSamples.SelectedIndexChanged += new System.EventHandler(this.cmbSamples_SelectedIndexChanged);
+      // 
+      // label1
+      // 
+      this.label1.AutoSize = true;
+      this.label1.Location = new System.Drawing.Point(3, 6);
+      this.label1.Name = "label1";
+      this.label1.Size = new System.Drawing.Size(47, 13);
+      this.label1.TabIndex = 2;
+      this.label1.Text = "Samples";
+      // 
+      // ConfusionMatrixView
+      // 
+      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+      this.Controls.Add(this.label1);
+      this.Controls.Add(this.cmbSamples);
+      this.Controls.Add(this.dataGridView);
+      this.Name = "ConfusionMatrixView";
+      this.Size = new System.Drawing.Size(309, 230);
+      ((System.ComponentModel.ISupportInitialize)(this.dataGridView)).EndInit();
+      this.ResumeLayout(false);
+      this.PerformLayout();
+
+    }
+
+    #endregion
+
+    private System.Windows.Forms.DataGridView dataGridView;
+    private System.Windows.Forms.ComboBox cmbSamples;
+    private System.Windows.Forms.Label label1;
+
+  }
+}
Index: /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/ClassificationSolutionConfusionMatrixView.cs
===================================================================
--- /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/ClassificationSolutionConfusionMatrixView.cs	(revision 5664)
+++ /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/ClassificationSolutionConfusionMatrixView.cs	(revision 5664)
@@ -0,0 +1,142 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 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 HeuristicLab.MainForm;
+using HeuristicLab.MainForm.WindowsForms;
+
+namespace HeuristicLab.Problems.DataAnalysis.Classification.Views {
+  [View("Classification solution confusion matrix view")]
+  [Content(typeof(IClassificationSolution))]
+  public partial class ClassificationSolutionConfusionMatrixView : AsynchronousContentView {
+    private const string TrainingSamples = "Training";
+    private const string TestSamples = "Test";
+    public ClassificationSolutionConfusionMatrixView() {
+      InitializeComponent();
+      cmbSamples.Items.Add(TrainingSamples);
+      cmbSamples.Items.Add(TestSamples);
+      cmbSamples.SelectedIndex = 0;
+    }
+
+    public new IClassificationSolution Content {
+      get { return (IClassificationSolution)base.Content; }
+      set { base.Content = value; }
+    }
+
+    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);
+    }
+
+    private void Content_ModelChanged(object sender, EventArgs e) {
+      FillDataGridView();
+    }
+    private void Content_ProblemDataChanged(object sender, EventArgs e) {
+      UpdateDataGridView();
+    }
+
+    protected override void OnContentChanged() {
+      base.OnContentChanged();
+      UpdateDataGridView();
+    }
+
+    private void UpdateDataGridView() {
+      if (InvokeRequired) Invoke((Action)UpdateDataGridView);
+      else {
+        if (Content == null) {
+          dataGridView.RowCount = 1;
+          dataGridView.ColumnCount = 1;
+        } else {
+          dataGridView.ColumnCount = Content.ProblemData.Classes;
+          dataGridView.RowCount = Content.ProblemData.Classes;
+
+          int i = 0;
+          foreach (string headerText in Content.ProblemData.ClassNames) {
+            dataGridView.Columns[i].HeaderText = "Actual " + headerText;
+            dataGridView.Rows[i].HeaderCell.Value = "Predicted " + headerText;
+            i++;
+          }
+          dataGridView.AutoResizeColumns(DataGridViewAutoSizeColumnsMode.ColumnHeader);
+          dataGridView.AutoResizeRowHeadersWidth(DataGridViewRowHeadersWidthSizeMode.AutoSizeToAllHeaders);
+
+          FillDataGridView();
+        }
+      }
+    }
+
+    private void FillDataGridView() {
+      if (InvokeRequired) Invoke((Action)FillDataGridView);
+      else {
+        if (Content == null) return;
+
+        double[,] confusionMatrix = new double[Content.ProblemData.Classes, Content.ProblemData.Classes];
+        IEnumerable<int> rows;
+
+        if (cmbSamples.SelectedItem.ToString() == TrainingSamples) {
+          rows = Content.ProblemData.TrainingIndizes;
+        } else if (cmbSamples.SelectedItem.ToString() == TestSamples) {
+          rows = Content.ProblemData.TestIndizes;
+        } else throw new InvalidOperationException();
+
+        Dictionary<double, int> classValueIndexMapping = new Dictionary<double, int>();
+        int index = 0;
+        foreach (double classValue in Content.ProblemData.ClassValues.OrderBy(x => x)) {
+          classValueIndexMapping.Add(classValue, index);
+          index++;
+        }
+
+        double[] targetValues = Content.ProblemData.Dataset.GetEnumeratedVariableValues(Content.ProblemData.TargetVariable, rows).ToArray();
+        double[] predictedValues = Content.GetEstimatedClassValues(rows).ToArray();
+
+        for (int i = 0; i < targetValues.Length; i++) {
+          double targetValue = targetValues[i];
+          double predictedValue = predictedValues[i];
+          int targetIndex = classValueIndexMapping[targetValue];
+          int predictedIndex = classValueIndexMapping[predictedValue];
+
+          confusionMatrix[predictedIndex, targetIndex] += 1;
+        }
+
+        for (int row = 0; row < confusionMatrix.GetLength(0); row++) {
+          for (int col = 0; col < confusionMatrix.GetLength(1); col++) {
+            //TODO add scaling to relative values;
+            dataGridView[col, row].Value = confusionMatrix[row, col];
+          }
+        }
+      }
+    }
+
+    private void cmbSamples_SelectedIndexChanged(object sender, System.EventArgs e) {
+      FillDataGridView();
+    }
+  }
+}
Index: /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/DiscriminantFunctionClassificationRocCurvesView.Designer.cs
===================================================================
--- /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/DiscriminantFunctionClassificationRocCurvesView.Designer.cs	(revision 5664)
+++ /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/DiscriminantFunctionClassificationRocCurvesView.Designer.cs	(revision 5664)
@@ -0,0 +1,98 @@
+﻿namespace HeuristicLab.Problems.DataAnalysis.Classification.Views {
+  partial class DiscriminantFunctionClassificationRocCurvesView {
+    /// <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() {
+      this.components = new System.ComponentModel.Container();
+      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.label1 = new System.Windows.Forms.Label();
+      this.cmbSamples = new System.Windows.Forms.ComboBox();
+      this.toolTip = new System.Windows.Forms.ToolTip(this.components);
+      ((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 = "ChartArea1";
+      this.chart.ChartAreas.Add(chartArea1);
+      legend1.Alignment = System.Drawing.StringAlignment.Center;
+      legend1.Docking = System.Windows.Forms.DataVisualization.Charting.Docking.Top;
+      legend1.Name = "Legend1";
+      this.chart.Legends.Add(legend1);
+      this.chart.Location = new System.Drawing.Point(0, 28);
+      this.chart.Name = "chart";
+      this.chart.Size = new System.Drawing.Size(366, 202);
+      this.chart.TabIndex = 0;
+      this.chart.Text = "chart";
+      this.chart.CustomizeLegend += new System.EventHandler<System.Windows.Forms.DataVisualization.Charting.CustomizeLegendEventArgs>(this.chart_CustomizeLegend);
+      this.chart.MouseDown += new System.Windows.Forms.MouseEventHandler(this.chart_MouseDown);
+      this.chart.MouseMove += new System.Windows.Forms.MouseEventHandler(this.chart_MouseMove);
+      // 
+      // label1
+      // 
+      this.label1.AutoSize = true;
+      this.label1.Location = new System.Drawing.Point(3, 6);
+      this.label1.Name = "label1";
+      this.label1.Size = new System.Drawing.Size(47, 13);
+      this.label1.TabIndex = 4;
+      this.label1.Text = "Samples";
+      // 
+      // cmbSamples
+      // 
+      this.cmbSamples.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+      this.cmbSamples.FormattingEnabled = true;
+      this.cmbSamples.Location = new System.Drawing.Point(56, 3);
+      this.cmbSamples.Name = "cmbSamples";
+      this.cmbSamples.Size = new System.Drawing.Size(121, 21);
+      this.cmbSamples.TabIndex = 3;
+      this.cmbSamples.SelectedIndexChanged += new System.EventHandler(this.cmbSamples_SelectedIndexChanged);
+      // 
+      // RocCurvesView
+      // 
+      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+      this.Controls.Add(this.label1);
+      this.Controls.Add(this.cmbSamples);
+      this.Controls.Add(this.chart);
+      this.Name = "RocCurvesView";
+      this.Size = new System.Drawing.Size(366, 230);
+      ((System.ComponentModel.ISupportInitialize)(this.chart)).EndInit();
+      this.ResumeLayout(false);
+      this.PerformLayout();
+
+    }
+
+    #endregion
+
+    private HeuristicLab.Visualization.ChartControlsExtensions.EnhancedChart chart;
+    private System.Windows.Forms.Label label1;
+    private System.Windows.Forms.ComboBox cmbSamples;
+    private System.Windows.Forms.ToolTip toolTip;
+
+  }
+}
Index: /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/DiscriminantFunctionClassificationRocCurvesView.cs
===================================================================
--- /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/DiscriminantFunctionClassificationRocCurvesView.cs	(revision 5664)
+++ /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/DiscriminantFunctionClassificationRocCurvesView.cs	(revision 5664)
@@ -0,0 +1,264 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 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.Drawing;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+using System.Windows.Forms.DataVisualization.Charting;
+using HeuristicLab.Common;
+using HeuristicLab.MainForm;
+using HeuristicLab.MainForm.WindowsForms;
+namespace HeuristicLab.Problems.DataAnalysis.Classification.Views {
+  [View("Discriminant function classification solution ROC curves view")]
+  [Content(typeof(IDiscriminantFunctionClassificationSolution))]
+  public partial class DiscriminantFunctionClassificationRocCurvesView : AsynchronousContentView {
+    private const string xAxisTitle = "False Positive Rate";
+    private const string yAxisTitle = "True Positive Rate";
+    private const string TrainingSamples = "Training";
+    private const string TestSamples = "Test";
+    private Dictionary<string, List<ROCPoint>> cachedRocPoints;
+
+    public DiscriminantFunctionClassificationRocCurvesView() {
+      InitializeComponent();
+
+      cachedRocPoints = new Dictionary<string, List<ROCPoint>>();
+
+      cmbSamples.Items.Add(TrainingSamples);
+      cmbSamples.Items.Add(TestSamples);
+      cmbSamples.SelectedIndex = 0;
+
+      chart.CustomizeAllChartAreas();
+      chart.ChartAreas[0].AxisX.Minimum = 0.0;
+      chart.ChartAreas[0].AxisX.Maximum = 1.0;
+      chart.ChartAreas[0].AxisX.MajorGrid.Interval = 0.2;
+      chart.ChartAreas[0].AxisY.Minimum = 0.0;
+      chart.ChartAreas[0].AxisY.Maximum = 1.0;
+      chart.ChartAreas[0].AxisY.MajorGrid.Interval = 0.2;
+
+      chart.ChartAreas[0].AxisX.Title = xAxisTitle;
+      chart.ChartAreas[0].AxisY.Title = yAxisTitle;
+    }
+
+    public new IDiscriminantFunctionClassificationSolution Content {
+      get { return (IDiscriminantFunctionClassificationSolution)base.Content; }
+      set { base.Content = value; }
+    }
+
+    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);
+    }
+
+    private void Content_ModelChanged(object sender, EventArgs e) {
+      UpdateChart();
+    }
+    private void Content_ProblemDataChanged(object sender, EventArgs e) {
+      UpdateChart();
+    }
+
+    protected override void OnContentChanged() {
+      base.OnContentChanged();
+      chart.Series.Clear();
+      if (Content != null) UpdateChart();
+    }
+
+    private void UpdateChart() {
+      if (InvokeRequired) Invoke((Action)UpdateChart);
+      else {
+        chart.Series.Clear();
+        chart.Annotations.Clear();
+        cachedRocPoints.Clear();
+
+        int slices = 100;
+        IEnumerable<int> rows;
+
+        if (cmbSamples.SelectedItem.ToString() == TrainingSamples) {
+          rows = Content.ProblemData.TrainingIndizes;
+        } else if (cmbSamples.SelectedItem.ToString() == TestSamples) {
+          rows = Content.ProblemData.TestIndizes;
+        } else throw new InvalidOperationException();
+
+        double[] estimatedValues = Content.GetEstimatedValues(rows).ToArray();
+        double[] targetClassValues = Content.ProblemData.Dataset.GetEnumeratedVariableValues(Content.ProblemData.TargetVariable, rows).ToArray();
+        double minThreshold = estimatedValues.Min();
+        double maxThreshold = estimatedValues.Max();
+        double thresholdIncrement = (maxThreshold - minThreshold) / slices;
+        minThreshold -= thresholdIncrement;
+        maxThreshold += thresholdIncrement;
+
+        List<double> classValues = Content.ProblemData.ClassValues.OrderBy(x => x).ToList();
+
+        foreach (double classValue in classValues) {
+          List<ROCPoint> rocPoints = new List<ROCPoint>();
+          int positives = targetClassValues.Where(c => c.IsAlmost(classValue)).Count();
+          int negatives = targetClassValues.Length - positives;
+
+          for (double lowerThreshold = minThreshold; lowerThreshold < maxThreshold; lowerThreshold += thresholdIncrement) {
+            for (double upperThreshold = lowerThreshold + thresholdIncrement; upperThreshold < maxThreshold; upperThreshold += thresholdIncrement) {
+              //only adapt lower threshold for binary classification problems and upper class prediction              
+              if (classValues.Count == 2 && classValue == classValues[1]) upperThreshold = double.PositiveInfinity;
+
+              int truePositives = 0;
+              int falsePositives = 0;
+
+              for (int row = 0; row < estimatedValues.Length; row++) {
+                if (lowerThreshold < estimatedValues[row] && estimatedValues[row] < upperThreshold) {
+                  if (targetClassValues[row].IsAlmost(classValue)) truePositives++;
+                  else falsePositives++;
+                }
+              }
+
+              double truePositiveRate = ((double)truePositives) / positives;
+              double falsePositiveRate = ((double)falsePositives) / negatives;
+
+              ROCPoint rocPoint = new ROCPoint(truePositiveRate, falsePositiveRate, lowerThreshold, upperThreshold);
+              if (!rocPoints.Any(x => x.truePositiveRate >= rocPoint.truePositiveRate && x.falsePositiveRate <= rocPoint.falsePositiveRate)) {
+                rocPoints.RemoveAll(x => x.falsePositiveRate >= rocPoint.falsePositiveRate && x.truePositiveRate <= rocPoint.truePositiveRate);
+                rocPoints.Add(rocPoint);
+              }
+            }
+            //only adapt upper threshold for binary classification problems and upper class prediction              
+            if (classValues.Count == 2 && classValue == classValues[0]) lowerThreshold = double.PositiveInfinity;
+          }
+
+          string className = Content.ProblemData.ClassNames.ElementAt(classValues.IndexOf(classValue));
+          cachedRocPoints[className] = rocPoints.OrderBy(x => x.falsePositiveRate).ToList(); ;
+
+          Series series = new Series(className);
+          series.ChartType = SeriesChartType.Line;
+          series.MarkerStyle = MarkerStyle.Diamond;
+          series.MarkerSize = 5;
+          chart.Series.Add(series);
+          FillSeriesWithDataPoints(series, cachedRocPoints[className]);
+
+          double auc = CalculateAreaUnderCurve(series);
+          series.LegendToolTip = "AUC: " + auc;
+        }
+      }
+    }
+
+    private void FillSeriesWithDataPoints(Series series, IEnumerable<ROCPoint> rocPoints) {
+      series.Points.Add(new DataPoint(0, 0));
+      foreach (ROCPoint rocPoint in rocPoints) {
+        DataPoint point = new DataPoint();
+        point.XValue = rocPoint.falsePositiveRate;
+        point.YValues[0] = rocPoint.truePositiveRate;
+        point.Tag = rocPoint;
+
+        StringBuilder sb = new StringBuilder();
+        sb.AppendLine("True Positive Rate: " + rocPoint.truePositiveRate);
+        sb.AppendLine("False Positive Rate: " + rocPoint.falsePositiveRate);
+        sb.AppendLine("Upper Threshold: " + rocPoint.upperThreshold);
+        sb.AppendLine("Lower Threshold: " + rocPoint.lowerThreshold);
+        point.ToolTip = sb.ToString();
+
+        series.Points.Add(point);
+      }
+      series.Points.Add(new DataPoint(1, 1));
+    }
+
+    private double CalculateAreaUnderCurve(Series series) {
+      if (series.Points.Count < 1) throw new ArgumentException("Could not calculate area under curve if less than 1 data points were given.");
+
+      double auc = 0.0;
+      for (int i = 1; i < series.Points.Count; i++) {
+        double width = series.Points[i].XValue - series.Points[i - 1].XValue;
+        double y1 = series.Points[i - 1].YValues[0];
+        double y2 = series.Points[i].YValues[0];
+
+        auc += (y1 + y2) * width / 2;
+      }
+
+      return auc;
+    }
+
+    private void cmbSamples_SelectedIndexChanged(object sender, System.EventArgs e) {
+      if (Content != null)
+        UpdateChart();
+    }
+
+
+    #region show / hide series
+    private void ToggleSeries(Series series) {
+      if (series.Points.Count == 0)
+        FillSeriesWithDataPoints(series, cachedRocPoints[series.Name]);
+      else
+        series.Points.Clear();
+    }
+    private void chart_MouseDown(object sender, MouseEventArgs e) {
+      HitTestResult result = chart.HitTest(e.X, e.Y);
+      if (result.ChartElementType == ChartElementType.LegendItem) {
+        if (result.Series != null) ToggleSeries(result.Series);
+      }
+    }
+    private void chart_CustomizeLegend(object sender, CustomizeLegendEventArgs e) {
+      foreach (LegendItem legendItem in e.LegendItems) {
+        var series = chart.Series[legendItem.SeriesName];
+        if (series != null) {
+          bool seriesIsInvisible = series.Points.Count == 0;
+          foreach (LegendCell cell in legendItem.Cells)
+            cell.ForeColor = seriesIsInvisible ? Color.Gray : Color.Black;
+        }
+      }
+    }
+    private void chart_MouseMove(object sender, MouseEventArgs e) {
+      HitTestResult result = chart.HitTest(e.X, e.Y);
+      if (result.ChartElementType == ChartElementType.LegendItem)
+        this.Cursor = Cursors.Hand;
+      else
+        this.Cursor = Cursors.Default;
+
+      string newTooltipText = string.Empty;
+      if (result.ChartElementType == ChartElementType.DataPoint)
+        newTooltipText = ((DataPoint)result.Object).ToolTip;
+
+      string oldTooltipText = this.toolTip.GetToolTip(chart);
+      if (newTooltipText != oldTooltipText)
+        this.toolTip.SetToolTip(chart, newTooltipText);
+    }
+    #endregion
+
+
+    private class ROCPoint {
+      public ROCPoint(double truePositiveRate, double falsePositiveRate, double lowerThreshold, double upperThreshold) {
+        this.truePositiveRate = truePositiveRate;
+        this.falsePositiveRate = falsePositiveRate;
+        this.lowerThreshold = lowerThreshold;
+        this.upperThreshold = upperThreshold;
+
+      }
+      public double truePositiveRate { get; private set; }
+      public double falsePositiveRate { get; private set; }
+      public double lowerThreshold { get; private set; }
+      public double upperThreshold { get; private set; }
+    }
+
+  }
+}
Index: /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/DiscriminantFunctionClassificationSolutionView.Designer.cs
===================================================================
--- /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/DiscriminantFunctionClassificationSolutionView.Designer.cs	(revision 5664)
+++ /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/DiscriminantFunctionClassificationSolutionView.Designer.cs	(revision 5664)
@@ -0,0 +1,101 @@
+﻿namespace HeuristicLab.Problems.DataAnalysis.Classification.Views {
+  partial class DiscriminantFunctionClassificationSolutionView {
+    /// <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.JitterTrackBar = new System.Windows.Forms.TrackBar();
+      this.label1 = new System.Windows.Forms.Label();
+      ((System.ComponentModel.ISupportInitialize)(this.chart)).BeginInit();
+      ((System.ComponentModel.ISupportInitialize)(this.JitterTrackBar)).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 = "ChartArea1";
+      this.chart.ChartAreas.Add(chartArea1);
+      legend1.Alignment = System.Drawing.StringAlignment.Center;
+      legend1.Docking = System.Windows.Forms.DataVisualization.Charting.Docking.Top;
+      legend1.Name = "Legend1";
+      this.chart.Legends.Add(legend1);
+      this.chart.Location = new System.Drawing.Point(3, 3);
+      this.chart.Name = "chart";
+      this.chart.Size = new System.Drawing.Size(553, 364);
+      this.chart.TabIndex = 0;
+      this.chart.Text = "chart";
+      this.chart.CustomizeLegend += new System.EventHandler<System.Windows.Forms.DataVisualization.Charting.CustomizeLegendEventArgs>(this.chart_CustomizeLegend);
+      this.chart.AnnotationPositionChanging += new System.EventHandler<System.Windows.Forms.DataVisualization.Charting.AnnotationPositionChangingEventArgs>(this.chart_AnnotationPositionChanging);
+      this.chart.MouseDown += new System.Windows.Forms.MouseEventHandler(this.chart_MouseDown);
+      this.chart.MouseMove += new System.Windows.Forms.MouseEventHandler(this.chart_MouseMove);
+      // 
+      // JitterTrackBar
+      // 
+      this.JitterTrackBar.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+      this.JitterTrackBar.BackColor = System.Drawing.SystemColors.Window;
+      this.JitterTrackBar.Location = new System.Drawing.Point(483, 341);
+      this.JitterTrackBar.Maximum = 100;
+      this.JitterTrackBar.Name = "JitterTrackBar";
+      this.JitterTrackBar.Size = new System.Drawing.Size(71, 45);
+      this.JitterTrackBar.TabIndex = 1;
+      this.JitterTrackBar.TickStyle = System.Windows.Forms.TickStyle.None;
+      this.JitterTrackBar.ValueChanged += new System.EventHandler(this.JitterTrackBar_ValueChanged);
+      // 
+      // label1
+      // 
+      this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+      this.label1.AutoSize = true;
+      this.label1.BackColor = System.Drawing.SystemColors.Window;
+      this.label1.Location = new System.Drawing.Point(448, 345);
+      this.label1.Name = "label1";
+      this.label1.Size = new System.Drawing.Size(32, 13);
+      this.label1.TabIndex = 2;
+      this.label1.Text = "Jitter:";
+      // 
+      // SymbolicClassificationSolutionView
+      // 
+      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+      this.Controls.Add(this.label1);
+      this.Controls.Add(this.JitterTrackBar);
+      this.Controls.Add(this.chart);
+      this.Name = "SymbolicClassificationSolutionView";
+      this.Size = new System.Drawing.Size(559, 370);
+      ((System.ComponentModel.ISupportInitialize)(this.chart)).EndInit();
+      ((System.ComponentModel.ISupportInitialize)(this.JitterTrackBar)).EndInit();
+      this.ResumeLayout(false);
+      this.PerformLayout();
+
+    }
+
+    #endregion
+
+    private HeuristicLab.Visualization.ChartControlsExtensions.EnhancedChart chart;
+    private System.Windows.Forms.TrackBar JitterTrackBar;
+    private System.Windows.Forms.Label label1;
+  }
+}
Index: /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/DiscriminantFunctionClassificationSolutionView.cs
===================================================================
--- /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/DiscriminantFunctionClassificationSolutionView.cs	(revision 5664)
+++ /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/DiscriminantFunctionClassificationSolutionView.cs	(revision 5664)
@@ -0,0 +1,276 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 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.Drawing;
+using System.Linq;
+using System.Windows.Forms;
+using System.Windows.Forms.DataVisualization.Charting;
+using HeuristicLab.Common;
+using HeuristicLab.MainForm;
+using HeuristicLab.MainForm.WindowsForms;
+
+namespace HeuristicLab.Problems.DataAnalysis.Classification.Views {
+  [View("Discriminant function classification solution view")]
+  [Content(typeof(IDiscriminantFunctionClassificationSolution), true)]
+  public sealed partial class DiscriminantFunctionClassificationSolutionView : AsynchronousContentView {
+    private const double TrainingAxisValue = 0.0;
+    private const double TestAxisValue = 10.0;
+    private const double TrainingTestBorder = (TestAxisValue - TrainingAxisValue) / 2;
+    private const string TrainingLabelText = "Training Samples";
+    private const string TestLabelText = "Test Samples";
+
+    public new IDiscriminantFunctionClassificationSolution Content {
+      get { return (IDiscriminantFunctionClassificationSolution)base.Content; }
+      set { base.Content = value; }
+    }
+
+    private Dictionary<double, Series> classValueSeriesMapping;
+    private Random random;
+    private bool updateInProgress;
+
+    public DiscriminantFunctionClassificationSolutionView()
+      : base() {
+      InitializeComponent();
+
+      classValueSeriesMapping = new Dictionary<double, Series>();
+      random = new Random();
+      updateInProgress = false;
+
+      this.chart.CustomizeAllChartAreas();
+      this.chart.ChartAreas[0].CursorX.IsUserSelectionEnabled = true;
+      this.chart.ChartAreas[0].AxisX.ScaleView.Zoomable = true;
+      this.chart.ChartAreas[0].AxisX.Minimum = TrainingAxisValue - TrainingTestBorder;
+      this.chart.ChartAreas[0].AxisX.Maximum = TestAxisValue + TrainingTestBorder;
+      AddCustomLabelToAxis(this.chart.ChartAreas[0].AxisX);
+
+      this.chart.ChartAreas[0].AxisY.Title = "Estimated Values";
+      this.chart.ChartAreas[0].CursorY.IsUserSelectionEnabled = true;
+      this.chart.ChartAreas[0].AxisX.ScaleView.Zoomable = true;
+    }
+
+    private void AddCustomLabelToAxis(Axis axis) {
+      CustomLabel trainingLabel = new CustomLabel();
+      trainingLabel.Text = TrainingLabelText;
+      trainingLabel.FromPosition = TrainingAxisValue - TrainingTestBorder;
+      trainingLabel.ToPosition = TrainingAxisValue + TrainingTestBorder;
+      axis.CustomLabels.Add(trainingLabel);
+
+      CustomLabel testLabel = new CustomLabel();
+      testLabel.Text = TestLabelText;
+      testLabel.FromPosition = TestAxisValue - TrainingTestBorder;
+      testLabel.ToPosition = TestAxisValue + TrainingTestBorder;
+      axis.CustomLabels.Add(testLabel);
+    }
+
+    protected override void RegisterContentEvents() {
+      base.RegisterContentEvents();
+      Content.ModelChanged += new EventHandler(Content_ModelChanged);
+      Content.ProblemDataChanged += new EventHandler(Content_ProblemDataChanged);
+      Content.ThresholdsChanged += new EventHandler(Content_ThresholdsChanged);
+    }
+    protected override void DeregisterContentEvents() {
+      base.DeregisterContentEvents();
+      Content.ModelChanged -= new EventHandler(Content_ModelChanged);
+      Content.ProblemDataChanged -= new EventHandler(Content_ProblemDataChanged);
+      Content.ThresholdsChanged -= new EventHandler(Content_ThresholdsChanged);
+    }
+
+    private void Content_ProblemDataChanged(object sender, EventArgs e) {
+      UpdateChart();
+    }
+    private void Content_ModelChanged(object sender, EventArgs e) {
+      UpdateChart();
+    }
+    private void Content_ThresholdsChanged(object sender, EventArgs e) {
+      AddThresholds();
+    }
+    protected override void OnContentChanged() {
+      base.OnContentChanged();
+      UpdateChart();
+    }
+
+    private void UpdateChart() {
+      if (InvokeRequired) Invoke((Action)UpdateChart);
+      else if (!updateInProgress) {
+        updateInProgress = true;
+        chart.Series.Clear();
+        classValueSeriesMapping.Clear();
+        if (Content != null) {
+          IEnumerator<string> classNameEnumerator = Content.ProblemData.ClassNames.GetEnumerator();
+          IEnumerator<double> classValueEnumerator = Content.ProblemData.ClassValues.OrderBy(x => x).GetEnumerator();
+          while (classNameEnumerator.MoveNext() && classValueEnumerator.MoveNext()) {
+            Series series = new Series(classNameEnumerator.Current);
+            series.ChartType = SeriesChartType.FastPoint;
+            series.Tag = classValueEnumerator.Current;
+            chart.Series.Add(series);
+            classValueSeriesMapping.Add(classValueEnumerator.Current, series);
+            FillSeriesWithDataPoints(series);
+          }
+          AddThresholds();
+        }
+        chart.ChartAreas[0].RecalculateAxesScale();
+        updateInProgress = false;
+      }
+    }
+
+    private void FillSeriesWithDataPoints(Series series) {
+      List<double> estimatedValues = Content.EstimatedValues.ToList();
+      foreach (int row in Content.ProblemData.TrainingIndizes) {
+        double estimatedValue = estimatedValues[row];
+        double targetValue = Content.ProblemData.Dataset[Content.ProblemData.TargetVariable, row];
+        if (targetValue.IsAlmost((double)series.Tag)) {
+          double jitterValue = random.NextDouble() * 2.0 - 1.0;
+          DataPoint point = new DataPoint();
+          point.XValue = TrainingAxisValue + 0.01 * jitterValue * JitterTrackBar.Value * (TrainingTestBorder * 0.9);
+          point.YValues[0] = estimatedValue;
+          point.Tag = new KeyValuePair<double, double>(TrainingAxisValue, jitterValue);
+          series.Points.Add(point);
+        }
+      }
+
+      foreach (int row in Content.ProblemData.TestIndizes) {
+        double estimatedValue = estimatedValues[row];
+        double targetValue = Content.ProblemData.Dataset[Content.ProblemData.TargetVariable, row];
+        if (targetValue == (double)series.Tag) {
+          double jitterValue = random.NextDouble() * 2.0 - 1.0;
+          DataPoint point = new DataPoint();
+          point.XValue = TestAxisValue + 0.01 * jitterValue * JitterTrackBar.Value * (TrainingTestBorder * 0.9);
+          point.YValues[0] = estimatedValue;
+          point.Tag = new KeyValuePair<double, double>(TestAxisValue, jitterValue);
+          series.Points.Add(point);
+        }
+      }
+
+      UpdateCursorInterval();
+    }
+
+    private void AddThresholds() {
+      chart.Annotations.Clear();
+      int classIndex = 1;
+      foreach (double threshold in Content.Thresholds) {
+        if (!double.IsInfinity(threshold)) {
+          HorizontalLineAnnotation annotation = new HorizontalLineAnnotation();
+          annotation.AllowMoving = true;
+          annotation.AllowResizing = false;
+          annotation.LineWidth = 2;
+          annotation.LineColor = Color.Red;
+
+          annotation.IsInfinitive = true;
+          annotation.ClipToChartArea = chart.ChartAreas[0].Name;
+          annotation.Tag = classIndex;  //save classIndex as Tag to avoid moving the threshold accross class bounderies
+
+          annotation.AxisX = chart.ChartAreas[0].AxisX;
+          annotation.AxisY = chart.ChartAreas[0].AxisY;
+          annotation.Y = threshold;
+
+          chart.Annotations.Add(annotation);
+          classIndex++;
+        }
+      }
+    }
+
+    private void JitterTrackBar_ValueChanged(object sender, EventArgs e) {
+      foreach (Series series in chart.Series) {
+        foreach (DataPoint point in series.Points) {
+          double value = ((KeyValuePair<double, double>)point.Tag).Key;
+          double jitterValue = ((KeyValuePair<double, double>)point.Tag).Value; ;
+          point.XValue = value + 0.01 * jitterValue * JitterTrackBar.Value * (TrainingTestBorder * 0.9);
+        }
+      }
+    }
+
+    private void chart_CustomizeLegend(object sender, CustomizeLegendEventArgs e) {
+      foreach (LegendItem legendItem in e.LegendItems) {
+        var series = chart.Series[legendItem.SeriesName];
+        if (series != null) {
+          bool seriesIsInvisible = series.Points.Count == 0;
+          foreach (LegendCell cell in legendItem.Cells)
+            cell.ForeColor = seriesIsInvisible ? Color.Gray : Color.Black;
+        }
+      }
+    }
+
+    private void chart_MouseMove(object sender, MouseEventArgs e) {
+      HitTestResult result = chart.HitTest(e.X, e.Y);
+      if (result.ChartElementType == ChartElementType.LegendItem)
+        this.Cursor = Cursors.Hand;
+      else
+        this.Cursor = Cursors.Default;
+    }
+
+    private void ToggleSeries(Series series) {
+      if (series.Points.Count == 0)
+        FillSeriesWithDataPoints(series);
+      else
+        series.Points.Clear();
+    }
+
+    private void chart_MouseDown(object sender, MouseEventArgs e) {
+      HitTestResult result = chart.HitTest(e.X, e.Y);
+      if (result.ChartElementType == ChartElementType.LegendItem) {
+        if (result.Series != null) ToggleSeries(result.Series);
+      }
+    }
+
+    private void chart_AnnotationPositionChanging(object sender, AnnotationPositionChangingEventArgs e) {
+      int classIndex = (int)e.Annotation.Tag;
+      double[] thresholds = Content.Thresholds.ToArray();
+      double max = thresholds[classIndex + 1];
+      double min = thresholds[classIndex - 1];
+
+      if (e.NewLocationY >= max)
+        e.NewLocationY = max;
+
+      if (e.NewLocationY <= min)
+        e.NewLocationY = min;
+
+      thresholds[classIndex] = e.NewLocationY;
+      Content.Thresholds = thresholds;
+    }
+
+    private void UpdateCursorInterval() {
+      Series series = chart.Series[0];
+      double[] xValues = (from point in series.Points
+                          where !point.IsEmpty
+                          select point.XValue)
+                    .DefaultIfEmpty(1.0)
+                    .ToArray();
+      double[] yValues = (from point in series.Points
+                          where !point.IsEmpty
+                          select point.YValues[0])
+                    .DefaultIfEmpty(1.0)
+                    .ToArray();
+
+      double xRange = xValues.Max() - xValues.Min();
+      double yRange = yValues.Max() - yValues.Min();
+      if (xRange.IsAlmost(0.0)) xRange = 1.0;
+      if (yRange.IsAlmost(0.0)) yRange = 1.0;
+      double xDigits = (int)Math.Log10(xRange) - 3;
+      double yDigits = (int)Math.Log10(yRange) - 3;
+      double xZoomInterval = Math.Pow(10, xDigits);
+      double yZoomInterval = Math.Pow(10, yDigits);
+      this.chart.ChartAreas[0].CursorX.Interval = xZoomInterval;
+      this.chart.ChartAreas[0].CursorY.Interval = yZoomInterval;
+    }
+  }
+}
Index: /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Views/3.4/HeuristicLab.Problems.DataAnalysis.Views-3.4.csproj
===================================================================
--- /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Views/3.4/HeuristicLab.Problems.DataAnalysis.Views-3.4.csproj	(revision 5663)
+++ /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Views/3.4/HeuristicLab.Problems.DataAnalysis.Views-3.4.csproj	(revision 5664)
@@ -110,4 +110,10 @@
   </ItemGroup>
   <ItemGroup>
+    <Compile Include="Classification\ClassificationSolutionConfusionMatrixView.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="Classification\ClassificationSolutionConfusionMatrixView.Designer.cs">
+      <DependentUpon>ClassificationSolutionConfusionMatrixView.cs</DependentUpon>
+    </Compile>
     <Compile Include="Classification\ClassificationSolutionEstimatedClassValuesView.cs">
       <SubType>UserControl</SubType>
@@ -115,4 +121,16 @@
     <Compile Include="Classification\ClassificationSolutionEstimatedClassValuesView.Designer.cs">
       <DependentUpon>ClassificationSolutionEstimatedClassValuesView.cs</DependentUpon>
+    </Compile>
+    <Compile Include="Classification\DiscriminantFunctionClassificationRocCurvesView.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="Classification\DiscriminantFunctionClassificationRocCurvesView.Designer.cs">
+      <DependentUpon>DiscriminantFunctionClassificationRocCurvesView.cs</DependentUpon>
+    </Compile>
+    <Compile Include="Classification\DiscriminantFunctionClassificationSolutionView.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="Classification\DiscriminantFunctionClassificationSolutionView.Designer.cs">
+      <DependentUpon>DiscriminantFunctionClassificationSolutionView.cs</DependentUpon>
     </Compile>
     <Compile Include="Regression\RegressionSolutionEstimatedValuesView.cs">
Index: /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis/3.4/DiscriminantFunctionClassificationSolution.cs
===================================================================
--- /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis/3.4/DiscriminantFunctionClassificationSolution.cs	(revision 5663)
+++ /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis/3.4/DiscriminantFunctionClassificationSolution.cs	(revision 5664)
@@ -77,5 +77,5 @@
         return Model.Thresholds;
       }
-      protected set { Model.Thresholds = value; }
+      set { Model.Thresholds = new List<double>(value); }
     }
 
@@ -117,9 +117,9 @@
       thresholds[thresholds.Length - 1] = double.PositiveInfinity;
 
+      double thresholdIncrement = (maxEstimatedValue - minEstimatedValue) / slices;
+
       for (int i = 1; i < thresholds.Length - 1; i++) {
         double lowerThreshold = thresholds[i - 1];
-        double actualThreshold = minEstimatedValue;
-        double thresholdIncrement = (maxEstimatedValue - minEstimatedValue) / slices;
-
+        double actualThreshold = Math.Max(lowerThreshold, minEstimatedValue);
         double lowestBestThreshold = double.NaN;
         double highestBestThreshold = double.NaN;
Index: /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis/3.4/Interfaces/Classification/IDiscriminantFunctionClassificationSolution.cs
===================================================================
--- /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis/3.4/Interfaces/Classification/IDiscriminantFunctionClassificationSolution.cs	(revision 5663)
+++ /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis/3.4/Interfaces/Classification/IDiscriminantFunctionClassificationSolution.cs	(revision 5664)
@@ -31,5 +31,5 @@
     IEnumerable<double> GetEstimatedValues(IEnumerable<int> rows);
 
-    IEnumerable<double> Thresholds { get; }
+    IEnumerable<double> Thresholds { get; set; }
 
     event EventHandler ThresholdsChanged;
