- Timestamp:
- 03/10/11 14:41:17 (14 years ago)
- Location:
- branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Views/3.4
- Files:
-
- 3 added
- 1 edited
- 8 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/ClassificationSolutionEstimatedClassValuesView.Designer.cs
r5642 r5663 20 20 #endregion 21 21 namespace HeuristicLab.Problems.DataAnalysis.Views { 22 partial class EstimatedValuesView {22 partial class ClassificationSolutionEstimatedClassValuesView { 23 23 /// <summary> 24 24 /// Required designer variable. -
branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/ClassificationSolutionEstimatedClassValuesView.cs
r5642 r5663 28 28 29 29 namespace HeuristicLab.Problems.DataAnalysis.Views { 30 [View(" Estimated Values View")]31 [Content(typeof( DataAnalysisSolution))]32 public partial class EstimatedValuesView : AsynchronousContentView {30 [View("Classification solution estimated class values view")] 31 [Content(typeof(IClassificationSolution))] 32 public partial class ClassificationSolutionEstimatedClassValuesView : AsynchronousContentView { 33 33 private const string TARGETVARIABLE_SERIES_NAME = "TargetVariable"; 34 private const string ESTIMATEDVALUES_SERIES_NAME = "Estimated Values";34 private const string ESTIMATEDVALUES_SERIES_NAME = "EstimatedClassValues"; 35 35 36 public new DataAnalysisSolution Content {37 get { return ( DataAnalysisSolution)base.Content; }36 public new IClassificationSolution Content { 37 get { return (IClassificationSolution)base.Content; } 38 38 set { 39 39 base.Content = value; … … 43 43 private StringConvertibleMatrixView matrixView; 44 44 45 public EstimatedValuesView()45 public ClassificationSolutionEstimatedClassValuesView() 46 46 : base() { 47 47 InitializeComponent(); … … 56 56 protected override void RegisterContentEvents() { 57 57 base.RegisterContentEvents(); 58 Content. EstimatedValuesChanged += new EventHandler(Content_EstimatedValuesChanged);58 Content.ModelChanged += new EventHandler(Content_ModelChanged); 59 59 Content.ProblemDataChanged += new EventHandler(Content_ProblemDataChanged); 60 60 } … … 62 62 protected override void DeregisterContentEvents() { 63 63 base.DeregisterContentEvents(); 64 Content. EstimatedValuesChanged -= new EventHandler(Content_EstimatedValuesChanged);64 Content.ModelChanged -= new EventHandler(Content_ModelChanged); 65 65 Content.ProblemDataChanged -= new EventHandler(Content_ProblemDataChanged); 66 66 } 67 67 68 void Content_ProblemDataChanged(object sender, EventArgs e) {68 private void Content_ProblemDataChanged(object sender, EventArgs e) { 69 69 OnContentChanged(); 70 70 } 71 71 72 void Content_EstimatedValuesChanged(object sender, EventArgs e) {72 private void Content_ModelChanged(object sender, EventArgs e) { 73 73 OnContentChanged(); 74 74 } … … 84 84 DoubleMatrix matrix = null; 85 85 if (Content != null) { 86 double[,] values = new double[Content.ProblemData.Dataset.Rows, 4];86 double[,] values = new double[Content.ProblemData.Dataset.Rows, 2]; 87 87 88 double[] target = Content.ProblemData.Dataset.GetVariableValues(Content.ProblemData.TargetVariable .Value);89 double[] estimated = Content.Estimated Values.ToArray();88 double[] target = Content.ProblemData.Dataset.GetVariableValues(Content.ProblemData.TargetVariable); 89 double[] estimated = Content.EstimatedClassValues.ToArray(); 90 90 for (int row = 0; row < target.Length; row++) { 91 91 values[row, 0] = target[row]; 92 92 values[row, 1] = estimated[row]; 93 values[row, 2] = estimated[row] - target[row];94 values[row, 3] = estimated[row] / target[row] - 1;95 93 } 96 94 97 95 matrix = new DoubleMatrix(values); 98 matrix.ColumnNames = new string[] { "Original", "Estimated", "Error", "Rel. Error"};96 matrix.ColumnNames = new string[] { TARGETVARIABLE_SERIES_NAME, ESTIMATEDVALUES_SERIES_NAME }; 99 97 } 100 98 matrixView.Content = matrix; -
branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Views/3.4/HeuristicLab.Problems.DataAnalysis.Views-3.4.csproj
r5623 r5663 110 110 </ItemGroup> 111 111 <ItemGroup> 112 <Compile Include="Classification\ClassificationSolutionEstimatedClassValuesView.cs"> 113 <SubType>UserControl</SubType> 114 </Compile> 115 <Compile Include="Classification\ClassificationSolutionEstimatedClassValuesView.Designer.cs"> 116 <DependentUpon>ClassificationSolutionEstimatedClassValuesView.cs</DependentUpon> 117 </Compile> 118 <Compile Include="Regression\RegressionSolutionEstimatedValuesView.cs"> 119 <SubType>UserControl</SubType> 120 </Compile> 121 <Compile Include="Regression\RegressionSolutionEstimatedValuesView.Designer.cs"> 122 <DependentUpon>RegressionSolutionEstimatedValuesView.cs</DependentUpon> 123 </Compile> 124 <Compile Include="Regression\RegressionSolutionLineChartView.cs"> 125 <SubType>UserControl</SubType> 126 </Compile> 127 <Compile Include="Regression\RegressionSolutionLineChartView.Designer.cs"> 128 <DependentUpon>RegressionSolutionLineChartView.cs</DependentUpon> 129 </Compile> 130 <Compile Include="Regression\RegressionSolutionScatterPlotView.cs"> 131 <SubType>UserControl</SubType> 132 </Compile> 133 <Compile Include="Regression\RegressionSolutionScatterPlotView.Designer.cs"> 134 <DependentUpon>RegressionSolutionScatterPlotView.cs</DependentUpon> 135 </Compile> 112 136 <None Include="HeuristicLab.snk" /> 113 137 <None Include="HeuristicLabProblemsDataAnalysisViewsPlugin.cs.frame" /> … … 186 210 <Project>{DF87C13E-A889-46FF-8153-66DCAA8C5674}</Project> 187 211 <Name>HeuristicLab.Problems.DataAnalysis-3.4</Name> 212 </ProjectReference> 213 <ProjectReference Include="..\..\HeuristicLab.Visualization.ChartControlsExtensions\3.3\HeuristicLab.Visualization.ChartControlsExtensions-3.3.csproj"> 214 <Project>{315BDA09-3F4F-49B3-9790-B37CFC1C5750}</Project> 215 <Name>HeuristicLab.Visualization.ChartControlsExtensions-3.3</Name> 188 216 </ProjectReference> 189 217 </ItemGroup> … … 204 232 <Install>true</Install> 205 233 </BootstrapperPackage> 234 </ItemGroup> 235 <ItemGroup> 236 <Folder Include="Clustering\" /> 206 237 </ItemGroup> 207 238 <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> -
branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionEstimatedValuesView.Designer.cs
r5642 r5663 20 20 #endregion 21 21 namespace HeuristicLab.Problems.DataAnalysis.Views { 22 partial class EstimatedValuesView {22 partial class RegressionSolutionEstimatedValuesView { 23 23 /// <summary> 24 24 /// Required designer variable. -
branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionEstimatedValuesView.cs
r5642 r5663 28 28 29 29 namespace HeuristicLab.Problems.DataAnalysis.Views { 30 [View(" Estimated Values View")]31 [Content(typeof( DataAnalysisSolution))]32 public partial class EstimatedValuesView : AsynchronousContentView {30 [View("Regression solution estimated values view")] 31 [Content(typeof(IRegressionSolution))] 32 public partial class RegressionSolutionEstimatedValuesView : AsynchronousContentView { 33 33 private const string TARGETVARIABLE_SERIES_NAME = "TargetVariable"; 34 34 private const string ESTIMATEDVALUES_SERIES_NAME = "EstimatedValues"; 35 35 36 public new DataAnalysisSolution Content {37 get { return ( DataAnalysisSolution)base.Content; }36 public new IRegressionSolution Content { 37 get { return (IRegressionSolution)base.Content; } 38 38 set { 39 39 base.Content = value; … … 43 43 private StringConvertibleMatrixView matrixView; 44 44 45 public EstimatedValuesView()45 public RegressionSolutionEstimatedValuesView() 46 46 : base() { 47 47 InitializeComponent(); … … 56 56 protected override void RegisterContentEvents() { 57 57 base.RegisterContentEvents(); 58 Content. EstimatedValuesChanged += new EventHandler(Content_EstimatedValuesChanged);58 Content.ModelChanged += new EventHandler(Content_ModelChanged); 59 59 Content.ProblemDataChanged += new EventHandler(Content_ProblemDataChanged); 60 60 } … … 62 62 protected override void DeregisterContentEvents() { 63 63 base.DeregisterContentEvents(); 64 Content. EstimatedValuesChanged -= new EventHandler(Content_EstimatedValuesChanged);64 Content.ModelChanged -= new EventHandler(Content_ModelChanged); 65 65 Content.ProblemDataChanged -= new EventHandler(Content_ProblemDataChanged); 66 66 } 67 67 68 void Content_ProblemDataChanged(object sender, EventArgs e) {68 private void Content_ProblemDataChanged(object sender, EventArgs e) { 69 69 OnContentChanged(); 70 70 } 71 71 72 void Content_EstimatedValuesChanged(object sender, EventArgs e) {72 private void Content_ModelChanged(object sender, EventArgs e) { 73 73 OnContentChanged(); 74 74 } … … 86 86 double[,] values = new double[Content.ProblemData.Dataset.Rows, 4]; 87 87 88 double[] target = Content.ProblemData.Dataset.GetVariableValues(Content.ProblemData.TargetVariable .Value);88 double[] target = Content.ProblemData.Dataset.GetVariableValues(Content.ProblemData.TargetVariable); 89 89 double[] estimated = Content.EstimatedValues.ToArray(); 90 90 for (int row = 0; row < target.Length; row++) { … … 96 96 97 97 matrix = new DoubleMatrix(values); 98 matrix.ColumnNames = new string[] { "Original", "Estimated", "Error", "Rel.Error" };98 matrix.ColumnNames = new string[] { TARGETVARIABLE_SERIES_NAME, ESTIMATEDVALUES_SERIES_NAME, "Absolute Error", "Relative Error" }; 99 99 } 100 100 matrixView.Content = matrix; -
branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionLineChartView.Designer.cs
r5642 r5663 20 20 #endregion 21 21 namespace HeuristicLab.Problems.DataAnalysis.Views { 22 partial class LineChartView {22 partial class RegressionSolutionLineChartView { 23 23 /// <summary> 24 24 /// Required designer variable. -
branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionLineChartView.cs
r5642 r5663 28 28 29 29 namespace HeuristicLab.Problems.DataAnalysis.Views { 30 [View(" Line Chart View")]31 [Content(typeof( DataAnalysisSolution))]32 public partial class LineChartView : AsynchronousContentView {30 [View("Regression solution line chart")] 31 [Content(typeof(IRegressionSolution))] 32 public partial class RegressionSolutionLineChartView : AsynchronousContentView { 33 33 private const string TARGETVARIABLE_SERIES_NAME = "TargetVariable"; 34 34 private const string ESTIMATEDVALUES_SERIES_NAME = "EstimatedValues"; 35 35 36 public new DataAnalysisSolution Content {37 get { return ( DataAnalysisSolution)base.Content; }36 public new IRegressionSolution Content { 37 get { return (IRegressionSolution)base.Content; } 38 38 set { base.Content = value; } 39 39 } 40 40 41 public LineChartView()41 public RegressionSolutionLineChartView() 42 42 : base() { 43 43 InitializeComponent(); … … 57 57 if (Content != null) { 58 58 this.chart.Series.Add(TARGETVARIABLE_SERIES_NAME); 59 this.chart.Series[TARGETVARIABLE_SERIES_NAME].LegendText = Content.ProblemData.TargetVariable .Value;59 this.chart.Series[TARGETVARIABLE_SERIES_NAME].LegendText = Content.ProblemData.TargetVariable; 60 60 this.chart.Series[TARGETVARIABLE_SERIES_NAME].ChartType = SeriesChartType.FastLine; 61 this.chart.Series[TARGETVARIABLE_SERIES_NAME].Points.DataBindY(Content.ProblemData.Dataset.GetVariableValues(Content.ProblemData.TargetVariable .Value));61 this.chart.Series[TARGETVARIABLE_SERIES_NAME].Points.DataBindY(Content.ProblemData.Dataset.GetVariableValues(Content.ProblemData.TargetVariable)); 62 62 this.UpdateStripLines(); 63 63 … … 85 85 protected override void RegisterContentEvents() { 86 86 base.RegisterContentEvents(); 87 Content. EstimatedValuesChanged += new EventHandler(Content_EstimatedValuesChanged);87 Content.ModelChanged += new EventHandler(Content_ModelChanged); 88 88 Content.ProblemDataChanged += new EventHandler(Content_ProblemDataChanged); 89 89 } 90 90 protected override void DeregisterContentEvents() { 91 91 base.DeregisterContentEvents(); 92 Content. EstimatedValuesChanged -= new EventHandler(Content_EstimatedValuesChanged);92 Content.ModelChanged -= new EventHandler(Content_ModelChanged); 93 93 Content.ProblemDataChanged -= new EventHandler(Content_ProblemDataChanged); 94 94 } … … 98 98 } 99 99 100 private void Content_ EstimatedValuesChanged(object sender, EventArgs e) {100 private void Content_ModelChanged(object sender, EventArgs e) { 101 101 UpdateEstimatedValuesLineChart(); 102 102 } … … 136 136 this.chart.ChartAreas[0].AxisX.StripLines.Clear(); 137 137 this.CreateAndAddStripLine("Training", Color.FromArgb(20, Color.Green), 138 Content.ProblemData.Training SamplesStart.Value,139 Content.ProblemData.Training SamplesEnd.Value);138 Content.ProblemData.TrainingPartitionStart.Value, 139 Content.ProblemData.TrainingPartitionEnd.Value); 140 140 this.CreateAndAddStripLine("Test", Color.FromArgb(20, Color.Red), 141 Content.ProblemData.Test SamplesStart.Value,142 Content.ProblemData.Test SamplesEnd.Value);141 Content.ProblemData.TestPartitionStart.Value, 142 Content.ProblemData.TestPartitionEnd.Value); 143 143 } 144 144 -
branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionScatterPlotView.Designer.cs
r5642 r5663 21 21 22 22 namespace HeuristicLab.Problems.DataAnalysis.Views { 23 partial class ScatterPlotView {23 partial class RegressionSolutionScatterPlotView { 24 24 /// <summary> 25 25 /// Required designer variable. -
branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionScatterPlotView.cs
r5642 r5663 29 29 30 30 namespace HeuristicLab.Problems.DataAnalysis.Views { 31 [View(" Scatter Plot View")]32 [Content(typeof( DataAnalysisSolution), true)]33 public partial class ScatterPlotView : AsynchronousContentView {34 private const string ALL_SERIES = "All Samples";35 private const string TRAINING_SERIES = "Training Samples";36 private const string TEST_SERIES = "Test Samples";37 38 public new DataAnalysisSolution Content {39 get { return ( DataAnalysisSolution)base.Content; }31 [View("Regression solution scatter plot")] 32 [Content(typeof(IRegressionSolution))] 33 public partial class RegressionSolutionScatterPlotView : AsynchronousContentView { 34 private const string ALL_SERIES = "All samples"; 35 private const string TRAINING_SERIES = "Training samples"; 36 private const string TEST_SERIES = "Test samples"; 37 38 public new IRegressionSolution Content { 39 get { return (IRegressionSolution)base.Content; } 40 40 set { base.Content = value; } 41 41 } 42 42 43 public ScatterPlotView()43 public RegressionSolutionScatterPlotView() 44 44 : base() { 45 45 InitializeComponent(); … … 77 77 protected override void RegisterContentEvents() { 78 78 base.RegisterContentEvents(); 79 Content. EstimatedValuesChanged += new EventHandler(Content_EstimatedValuesChanged);79 Content.ModelChanged += new EventHandler(Content_ModelChanged); 80 80 Content.ProblemDataChanged += new EventHandler(Content_ProblemDataChanged); 81 81 } 82 82 protected override void DeregisterContentEvents() { 83 83 base.DeregisterContentEvents(); 84 Content. EstimatedValuesChanged -= new EventHandler(Content_EstimatedValuesChanged);84 Content.ModelChanged -= new EventHandler(Content_ModelChanged); 85 85 Content.ProblemDataChanged -= new EventHandler(Content_ProblemDataChanged); 86 86 } … … 90 90 UpdateChart(); 91 91 } 92 private void Content_ EstimatedValuesChanged(object sender, EventArgs e) {92 private void Content_ModelChanged(object sender, EventArgs e) { 93 93 UpdateSeries(); 94 94 } … … 126 126 if (InvokeRequired) Invoke((Action)UpdateSeries); 127 127 else { 128 string targetVariableName = Content.ProblemData.TargetVariable .Value;128 string targetVariableName = Content.ProblemData.TargetVariable; 129 129 Dataset dataset = Content.ProblemData.Dataset; 130 130 if (this.chart.Series[ALL_SERIES].Points.Count > 0) … … 170 170 } 171 171 } else if (Content != null) { 172 string targetVariableName = Content.ProblemData.TargetVariable .Value;172 string targetVariableName = Content.ProblemData.TargetVariable; 173 173 174 174 IEnumerable<double> predictedValues = null;
Note: See TracChangeset
for help on using the changeset viewer.