Index: branches/DataAnalysis/HeuristicLab.Problems.DataAnalysis.MultiVariate.Views/3.3/EstimatedValuesView.Designer.cs
===================================================================
--- branches/DataAnalysis/HeuristicLab.Problems.DataAnalysis.MultiVariate.Views/3.3/EstimatedValuesView.Designer.cs	(revision 4401)
+++ branches/DataAnalysis/HeuristicLab.Problems.DataAnalysis.MultiVariate.Views/3.3/EstimatedValuesView.Designer.cs	(revision 4401)
@@ -0,0 +1,62 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 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.MultiVariate.Views {
+  partial class EstimatedValuesView {
+    /// <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.SuspendLayout();
+      // 
+      // EstimatedValuesView
+      // 
+      this.AllowDrop = true;
+      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+      this.Name = "EstimatedValuesView";
+      this.Size = new System.Drawing.Size(310, 285);
+      this.ResumeLayout(false);
+
+    }
+
+    #endregion
+
+  }
+}
Index: branches/DataAnalysis/HeuristicLab.Problems.DataAnalysis.MultiVariate.Views/3.3/EstimatedValuesView.cs
===================================================================
--- branches/DataAnalysis/HeuristicLab.Problems.DataAnalysis.MultiVariate.Views/3.3/EstimatedValuesView.cs	(revision 4401)
+++ branches/DataAnalysis/HeuristicLab.Problems.DataAnalysis.MultiVariate.Views/3.3/EstimatedValuesView.cs	(revision 4401)
@@ -0,0 +1,101 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 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.Linq;
+using System.Windows.Forms;
+using HeuristicLab.Data;
+using HeuristicLab.Data.Views;
+using HeuristicLab.MainForm;
+using HeuristicLab.MainForm.WindowsForms;
+using System.Collections.Generic;
+
+namespace HeuristicLab.Problems.DataAnalysis.MultiVariate.Views {
+  [View("Estimated Values View")]
+  [Content(typeof(IMultiVariateDataAnalysisSolution))]
+  public partial class EstimatedValuesView : AsynchronousContentView {
+    private const string TARGETVARIABLE_SERIES_NAME = "TargetVariable";
+    private const string ESTIMATEDVALUES_SERIES_NAME = "EstimatedValues";
+
+    public new IMultiVariateDataAnalysisSolution Content {
+      get { return (IMultiVariateDataAnalysisSolution)base.Content; }
+      set {
+        base.Content = value;
+      }
+    }
+
+    private StringConvertibleMatrixView matrixView;
+
+    public EstimatedValuesView()
+      : base() {
+      InitializeComponent();
+      matrixView = new StringConvertibleMatrixView();
+      matrixView.Dock = DockStyle.Fill;
+      this.Controls.Add(matrixView);
+    }
+
+    #region events
+    protected override void RegisterContentEvents() {
+      base.RegisterContentEvents();
+      Content.ProblemDataChanged += new EventHandler(Content_ProblemDataChanged);
+    }
+
+    protected override void DeregisterContentEvents() {
+      base.DeregisterContentEvents();
+      Content.ProblemDataChanged -= new EventHandler(Content_ProblemDataChanged);
+    }
+
+    void Content_ProblemDataChanged(object sender, EventArgs e) {
+      OnContentChanged();
+    }
+
+    protected override void OnContentChanged() {
+      base.OnContentChanged();
+      UpdateEstimatedValues();
+    }
+
+    private void UpdateEstimatedValues() {
+      if (InvokeRequired) Invoke((Action)UpdateEstimatedValues);
+      else {
+        DoubleMatrix matrix = null;
+        if (Content != null) {
+          IEnumerable<string> targetVariables = Content.ProblemData.TargetVariables.CheckedItems.Select(x => x.Value.Value);
+          List<double[]> estimatedValues = Content.EstimatedValues.ToList();
+          double[,] values = new double[estimatedValues.Count, targetVariables.Count() * 2];
+          for (int row = 0; row < estimatedValues.Count; row++) {
+            int col = 0;
+            foreach (string targetVariable in targetVariables) {
+              values[row, col++] = Content.ProblemData.Dataset[targetVariable, row];
+              values[row, col++] = estimatedValues[row][(col - 1) / 2];
+            }
+          }
+          matrix = new DoubleMatrix(values);
+          string[] partitions = new string[] { "(original)", "(estimated)" };
+          matrix.ColumnNames = from targetVariable in targetVariables
+                               from partition in partitions
+                               select targetVariable + " " + partition;
+          ;
+        }
+        matrixView.Content = matrix;
+      }
+    }
+    #endregion
+  }
+}
Index: branches/DataAnalysis/HeuristicLab.Problems.DataAnalysis.MultiVariate.Views/3.3/HeuristicLab.Problems.DataAnalysis.MultiVariate.Views-3.3.csproj
===================================================================
--- branches/DataAnalysis/HeuristicLab.Problems.DataAnalysis.MultiVariate.Views/3.3/HeuristicLab.Problems.DataAnalysis.MultiVariate.Views-3.3.csproj	(revision 4235)
+++ branches/DataAnalysis/HeuristicLab.Problems.DataAnalysis.MultiVariate.Views/3.3/HeuristicLab.Problems.DataAnalysis.MultiVariate.Views-3.3.csproj	(revision 4401)
@@ -111,4 +111,22 @@
     <None Include="HeuristicLabProblemsDataAnalysisMultiVariateViewsPlugin.cs.frame" />
     <None Include="Properties\AssemblyInfo.frame" />
+    <Compile Include="EstimatedValuesView.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="EstimatedValuesView.Designer.cs">
+      <DependentUpon>EstimatedValuesView.cs</DependentUpon>
+    </Compile>
+    <Compile Include="LineChartView.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="LineChartView.Designer.cs">
+      <DependentUpon>LineChartView.cs</DependentUpon>
+    </Compile>
+    <Compile Include="MultiVariateDataAnalysisSolutionView.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="MultiVariateDataAnalysisSolutionView.Designer.cs">
+      <DependentUpon>MultiVariateDataAnalysisSolutionView.cs</DependentUpon>
+    </Compile>
     <Compile Include="HeuristicLabProblemsDataAnalysisMultiVariateViewsPlugin.cs" />
     <Compile Include="MultiVariateDataAnalysisProblemDataView.cs">
@@ -121,4 +139,8 @@
   </ItemGroup>
   <ItemGroup>
+    <ProjectReference Include="..\..\HeuristicLab.Collections\3.3\HeuristicLab.Collections-3.3.csproj">
+      <Project>{958B43BC-CC5C-4FA2-8628-2B3B01D890B6}</Project>
+      <Name>HeuristicLab.Collections-3.3</Name>
+    </ProjectReference>
     <ProjectReference Include="..\..\HeuristicLab.Common\3.3\HeuristicLab.Common-3.3.csproj">
       <Project>{A9AD58B9-3EF9-4CC1-97E5-8D909039FF5C}</Project>
@@ -137,4 +159,8 @@
       <Name>HeuristicLab.Data.Views-3.3</Name>
     </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Data\3.3\HeuristicLab.Data-3.3.csproj">
+      <Project>{BBAB9DF5-5EF3-4BA8-ADE9-B36E82114937}</Project>
+      <Name>HeuristicLab.Data-3.3</Name>
+    </ProjectReference>
     <ProjectReference Include="..\..\HeuristicLab.MainForm.WindowsForms\3.3\HeuristicLab.MainForm.WindowsForms-3.3.csproj">
       <Project>{AB687BBE-1BFE-476B-906D-44237135431D}</Project>
@@ -156,4 +182,8 @@
       <Project>{2B88DCD0-EE28-4DCA-90A8-2F4ECACFC515}</Project>
       <Name>HeuristicLab.Problems.DataAnalysis.MultiVariate-3.3</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Problems.DataAnalysis\3.3\HeuristicLab.Problems.DataAnalysis-3.3.csproj">
+      <Project>{70DFD984-B1D9-46FE-8EB7-4DE92D71A9FC}</Project>
+      <Name>HeuristicLab.Problems.DataAnalysis-3.3</Name>
     </ProjectReference>
   </ItemGroup>
Index: branches/DataAnalysis/HeuristicLab.Problems.DataAnalysis.MultiVariate.Views/3.3/LineChartView.Designer.cs
===================================================================
--- branches/DataAnalysis/HeuristicLab.Problems.DataAnalysis.MultiVariate.Views/3.3/LineChartView.Designer.cs	(revision 4401)
+++ branches/DataAnalysis/HeuristicLab.Problems.DataAnalysis.MultiVariate.Views/3.3/LineChartView.Designer.cs	(revision 4401)
@@ -0,0 +1,83 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 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.MultiVariate.Views {
+  partial class LineChartView {
+    /// <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 System.Windows.Forms.DataVisualization.Charting.Chart();
+      ((System.ComponentModel.ISupportInitialize)(this.chart)).BeginInit();
+      this.SuspendLayout();
+      // 
+      // chart
+      // 
+      chartArea1.Name = "ChartArea";
+      this.chart.ChartAreas.Add(chartArea1);
+      this.chart.Dock = System.Windows.Forms.DockStyle.Fill;
+      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, 0);
+      this.chart.Name = "chart";
+      this.chart.Size = new System.Drawing.Size(358, 225);
+      this.chart.TabIndex = 0;
+      // 
+      // QualityLineChart
+      // 
+      this.AllowDrop = true;
+      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+      this.Controls.Add(this.chart);
+      this.Name = "QualityLineChart";
+      this.Size = new System.Drawing.Size(358, 225);
+      ((System.ComponentModel.ISupportInitialize)(this.chart)).EndInit();
+      this.ResumeLayout(false);
+
+    }
+
+    #endregion
+
+    private System.Windows.Forms.DataVisualization.Charting.Chart chart;
+  }
+}
Index: branches/DataAnalysis/HeuristicLab.Problems.DataAnalysis.MultiVariate.Views/3.3/LineChartView.cs
===================================================================
--- branches/DataAnalysis/HeuristicLab.Problems.DataAnalysis.MultiVariate.Views/3.3/LineChartView.cs	(revision 4401)
+++ branches/DataAnalysis/HeuristicLab.Problems.DataAnalysis.MultiVariate.Views/3.3/LineChartView.cs	(revision 4401)
@@ -0,0 +1,131 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 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.Drawing;
+using System.Linq;
+using System.Windows.Forms;
+using System.Windows.Forms.DataVisualization.Charting;
+using HeuristicLab.MainForm;
+using HeuristicLab.MainForm.WindowsForms;
+using System.Collections.Generic;
+
+namespace HeuristicLab.Problems.DataAnalysis.MultiVariate.Views {
+  [View("Multi-Variate Line Chart View")]
+  [Content(typeof(IMultiVariateDataAnalysisSolution))]
+  public partial class LineChartView : AsynchronousContentView {
+    private const string TARGETVARIABLE_SERIES_NAME = "(target)";
+    private const string ESTIMATEDVALUES_SERIES_NAME = "(estimated)";
+
+    public new IMultiVariateDataAnalysisSolution Content {
+      get { return (IMultiVariateDataAnalysisSolution)base.Content; }
+      set { base.Content = value; }
+    }
+
+    public LineChartView()
+      : base() {
+      InitializeComponent();
+      //configure axis
+      this.chart.ChartAreas[0].CursorX.IsUserSelectionEnabled = true;
+      this.chart.ChartAreas[0].AxisX.ScaleView.Zoomable = true;
+      this.chart.ChartAreas[0].CursorX.Interval = 1;
+
+      this.chart.ChartAreas[0].CursorY.IsUserSelectionEnabled = true;
+      this.chart.ChartAreas[0].AxisY.ScaleView.Zoomable = true;
+      this.chart.ChartAreas[0].CursorY.Interval = 0;
+    }
+
+    private void RedrawChart() {
+      this.chart.Series.Clear();
+      IEnumerable<double[]> values = Content.EstimatedValues;
+      if (Content != null) {
+        List<string> targetVariables = Content.ProblemData.TargetVariables.CheckedItems.Select(x => x.Value.Value).ToList();
+        for (int col = 0; col < targetVariables.Count; col++) {
+          string targetVariable = targetVariables[col];
+          this.chart.Series.Add(targetVariable + " " + TARGETVARIABLE_SERIES_NAME);
+          this.chart.Series[targetVariable + " " + TARGETVARIABLE_SERIES_NAME].LegendText = targetVariable;
+          this.chart.Series[targetVariable + " " + TARGETVARIABLE_SERIES_NAME].ChartType = SeriesChartType.FastLine;
+          this.chart.Series[targetVariable + " " + TARGETVARIABLE_SERIES_NAME].Points.DataBindY(Content.ProblemData.Dataset.GetVariableValues(targetVariable));
+
+          this.chart.Series.Add(targetVariable + " " + ESTIMATEDVALUES_SERIES_NAME);
+          this.chart.Series[targetVariable + " " + ESTIMATEDVALUES_SERIES_NAME].LegendText = targetVariable + " " + ESTIMATEDVALUES_SERIES_NAME;
+          this.chart.Series[targetVariable + " " + ESTIMATEDVALUES_SERIES_NAME].ChartType = SeriesChartType.FastLine;
+          this.chart.Series[targetVariable + " " + ESTIMATEDVALUES_SERIES_NAME].Points.DataBindY(values.Select(x => x[col]).ToArray());
+          this.chart.Series[targetVariable + " " + ESTIMATEDVALUES_SERIES_NAME].Tag = Content;
+        }
+        this.UpdateStripLines();
+        UpdateCursorInterval();
+      }
+    }
+
+    private void UpdateCursorInterval() {
+      var allValues = (from series in this.chart.Series
+                       from point in series.Points
+                       select point.YValues[0])
+                            .DefaultIfEmpty(1.0);
+      double range = allValues.Max() - allValues.Min();
+      double interestingValuesRange = Math.Min(Math.Max(range, 1.0), Math.Max(range, 1.0));
+      double digits = (int)Math.Log10(interestingValuesRange) - 3;
+      double yZoomInterval = Math.Max(Math.Pow(10, digits), 10E-5);
+      this.chart.ChartAreas[0].CursorY.Interval = yZoomInterval;
+    }
+
+    #region events
+    protected override void RegisterContentEvents() {
+      base.RegisterContentEvents();
+      Content.ProblemDataChanged += new EventHandler(Content_ProblemDataChanged);
+    }
+    protected override void DeregisterContentEvents() {
+      base.DeregisterContentEvents();
+      Content.ProblemDataChanged -= new EventHandler(Content_ProblemDataChanged);
+    }
+
+    private void Content_ProblemDataChanged(object sender, EventArgs e) {
+      RedrawChart();
+    }
+
+    protected override void OnContentChanged() {
+      base.OnContentChanged();
+      RedrawChart();
+    }
+
+    #endregion
+
+    private void UpdateStripLines() {
+      this.chart.ChartAreas[0].AxisX.StripLines.Clear();
+      this.CreateAndAddStripLine("Training", Color.FromArgb(20, Color.Green),
+        Content.ProblemData.TrainingSamplesStart.Value,
+        Content.ProblemData.TrainingSamplesEnd.Value);
+      this.CreateAndAddStripLine("Test", Color.FromArgb(20, Color.Red),
+        Content.ProblemData.TestSamplesStart.Value,
+        Content.ProblemData.TestSamplesEnd.Value);
+    }
+
+    private void CreateAndAddStripLine(string title, Color c, int start, int end) {
+      StripLine stripLine = new StripLine();
+      stripLine.BackColor = c;
+      stripLine.Text = title;
+      stripLine.Font = new Font("Times New Roman", 12, FontStyle.Bold);
+      stripLine.StripWidth = end - start;
+      stripLine.IntervalOffset = start;
+      this.chart.ChartAreas[0].AxisX.StripLines.Add(stripLine);
+    }
+  }
+}
