- Timestamp:
- 03/28/12 15:47:26 (13 years ago)
- Location:
- branches/HeuristicLab.Hive.Azure
- Files:
-
- 5 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Hive.Azure
- Property svn:ignore
-
old new 3 3 *.resharper 4 4 *.suo 5 *.user 5 6 *.vsp 6 7 Doxygen 8 FxCopResults.txt 7 9 Google.ProtocolBuffers-0.9.1.dll 8 10 HeuristicLab 3.3.5.1.ReSharper.user
-
- Property svn:mergeinfo changed
- Property svn:ignore
-
branches/HeuristicLab.Hive.Azure/HeuristicLab.Problems.DataAnalysis.Views/3.4/DataAnalysisProblemView.Designer.cs
r7270 r7669 45 45 /// </summary> 46 46 private void InitializeComponent() { 47 this.openFileDialog = new System.Windows.Forms.OpenFileDialog(); 47 48 this.ImportButton = new System.Windows.Forms.Button(); 48 this.openFileDialog = new System.Windows.Forms.OpenFileDialog(); 49 ((System.ComponentModel.ISupportInitialize)(this.problemInstanceSplitContainer)).BeginInit(); 50 this.problemInstanceSplitContainer.Panel1.SuspendLayout(); 51 this.problemInstanceSplitContainer.Panel2.SuspendLayout(); 52 this.problemInstanceSplitContainer.SuspendLayout(); 49 53 ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit(); 50 54 this.SuspendLayout(); 51 55 // 56 // libraryInfoButton 57 // 58 this.libraryInfoButton.Location = new System.Drawing.Point(224, 1); 59 // 60 // problemInstanceSplitContainer 61 // 62 // 63 // problemInstanceSplitContainer.Panel2 64 // 65 this.problemInstanceSplitContainer.Panel2.Controls.Add(this.ImportButton); 66 // 52 67 // parameterCollectionView 53 68 // 54 this.parameterCollectionView.Location = new System.Drawing.Point(3, 55); 55 this.parameterCollectionView.Size = new System.Drawing.Size(490, 279); 56 this.parameterCollectionView.TabIndex = 4; 69 this.parameterCollectionView.Location = new System.Drawing.Point(6, 56); 70 this.parameterCollectionView.Size = new System.Drawing.Size(501, 274); 57 71 // 58 72 // nameTextBox … … 60 74 this.errorProvider.SetIconAlignment(this.nameTextBox, System.Windows.Forms.ErrorIconAlignment.MiddleLeft); 61 75 this.errorProvider.SetIconPadding(this.nameTextBox, 2); 62 this.nameTextBox.Size = new System.Drawing.Size(409, 20);63 //64 // infoLabel65 //66 this.infoLabel.Location = new System.Drawing.Point(474, 3);67 //68 // ImportButton69 //70 this.ImportButton.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)71 | System.Windows.Forms.AnchorStyles.Right)));72 this.ImportButton.Location = new System.Drawing.Point(0, 26);73 this.ImportButton.Name = "ImportButton";74 this.ImportButton.Size = new System.Drawing.Size(493, 23);75 this.ImportButton.TabIndex = 3;76 this.ImportButton.Text = "Import from CSV file";77 this.ImportButton.UseVisualStyleBackColor = true;78 this.ImportButton.Click += new System.EventHandler(this.ImportButton_Click);79 76 // 80 77 // openFileDialog … … 83 80 this.openFileDialog.Title = "Import data..."; 84 81 // 82 // ImportButton 83 // 84 this.ImportButton.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 85 | System.Windows.Forms.AnchorStyles.Right))); 86 this.ImportButton.Location = new System.Drawing.Point(6, 27); 87 this.ImportButton.Name = "ImportButton"; 88 this.ImportButton.Size = new System.Drawing.Size(501, 23); 89 this.ImportButton.TabIndex = 14; 90 this.ImportButton.Text = "Import from CSV file"; 91 this.ImportButton.UseVisualStyleBackColor = true; 92 this.ImportButton.Click += new System.EventHandler(this.ImportButton_Click); 93 // 85 94 // DataAnalysisProblemView 86 95 // 87 96 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 88 97 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 89 this.Controls.Add(this.ImportButton);90 98 this.Name = "DataAnalysisProblemView"; 91 this. Size = new System.Drawing.Size(493, 334);92 this. Controls.SetChildIndex(this.ImportButton, 0);93 this. Controls.SetChildIndex(this.infoLabel, 0);94 this. Controls.SetChildIndex(this.nameTextBox, 0);95 this.Controls.SetChildIndex(this.nameLabel, 0);96 this. Controls.SetChildIndex(this.parameterCollectionView, 0);99 this.problemInstanceSplitContainer.Panel1.ResumeLayout(false); 100 this.problemInstanceSplitContainer.Panel1.PerformLayout(); 101 this.problemInstanceSplitContainer.Panel2.ResumeLayout(false); 102 this.problemInstanceSplitContainer.Panel2.PerformLayout(); 103 ((System.ComponentModel.ISupportInitialize)(this.problemInstanceSplitContainer)).EndInit(); 104 this.problemInstanceSplitContainer.ResumeLayout(false); 97 105 ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit(); 98 106 this.ResumeLayout(false); 99 this.PerformLayout();100 107 101 108 } … … 103 110 #endregion 104 111 112 private System.Windows.Forms.OpenFileDialog openFileDialog; 105 113 private System.Windows.Forms.Button ImportButton; 106 private System.Windows.Forms.OpenFileDialog openFileDialog;107 114 } 108 115 } -
branches/HeuristicLab.Hive.Azure/HeuristicLab.Problems.DataAnalysis.Views/3.4/HeuristicLab.Problems.DataAnalysis.Views-3.4.csproj
r7215 r7669 141 141 <DependentUpon>RegressionEnsembleSolutionModelView.cs</DependentUpon> 142 142 </Compile> 143 <Compile Include="Regression\RegressionSolutionResidualHistogram.cs"> 144 <SubType>UserControl</SubType> 145 </Compile> 146 <Compile Include="Regression\RegressionSolutionResidualHistogram.Designer.cs"> 147 <DependentUpon>RegressionSolutionResidualHistogram.cs</DependentUpon> 148 </Compile> 143 149 <Compile Include="Solution Views\ClassificationSolutionView.cs"> 144 150 <SubType>UserControl</SubType> … … 251 257 <DependentUpon>RegressionSolutionScatterPlotView.cs</DependentUpon> 252 258 </Compile> 259 <Compile Include="DataAnalysisProblemView.cs"> 260 <SubType>UserControl</SubType> 261 </Compile> 262 <Compile Include="DataAnalysisProblemView.Designer.cs"> 263 <DependentUpon>DataAnalysisProblemView.cs</DependentUpon> 264 </Compile> 253 265 <None Include="HeuristicLab.snk" /> 254 266 <None Include="Plugin.cs.frame" /> 255 267 <None Include="Properties\AssemblyInfo.cs.frame" /> 256 <Compile Include="DataAnalysisProblemView.cs">257 <SubType>UserControl</SubType>258 </Compile>259 <Compile Include="DataAnalysisProblemView.Designer.cs">260 <DependentUpon>DataAnalysisProblemView.cs</DependentUpon>261 </Compile>262 268 <Compile Include="Properties\AssemblyInfo.cs" /> 263 269 </ItemGroup> -
branches/HeuristicLab.Hive.Azure/HeuristicLab.Problems.DataAnalysis.Views/3.4/Plugin.cs.frame
r7270 r7669 28 28 [Plugin("HeuristicLab.Problems.DataAnalysis.Views", "Provides views for base classes for data analysis tasks.", "3.4.2.$WCREV$")] 29 29 [PluginFile("HeuristicLab.Problems.DataAnalysis.Views-3.4.dll", PluginFileType.Assembly)] 30 [PluginDependency("HeuristicLab.ALGLIB","3.1.0.0")]31 30 [PluginDependency("HeuristicLab.Common", "3.3")] 32 31 [PluginDependency("HeuristicLab.Common.Resources", "3.3")] -
branches/HeuristicLab.Hive.Azure/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionLineChartView.cs
r7270 r7669 26 26 using System.Windows.Forms.DataVisualization.Charting; 27 27 using HeuristicLab.MainForm; 28 using HeuristicLab.MainForm.WindowsForms;29 28 30 29 namespace HeuristicLab.Problems.DataAnalysis.Views { … … 68 67 this.chart.Series[TARGETVARIABLE_SERIES_NAME].Points.DataBindXY(Enumerable.Range(0, Content.ProblemData.Dataset.Rows).ToArray(), 69 68 Content.ProblemData.Dataset.GetDoubleValues(Content.ProblemData.TargetVariable).ToArray()); 70 69 // training series 71 70 this.chart.Series.Add(ESTIMATEDVALUES_TRAINING_SERIES_NAME); 72 71 this.chart.Series[ESTIMATEDVALUES_TRAINING_SERIES_NAME].LegendText = ESTIMATEDVALUES_TRAINING_SERIES_NAME; 73 72 this.chart.Series[ESTIMATEDVALUES_TRAINING_SERIES_NAME].ChartType = SeriesChartType.FastLine; 73 this.chart.Series[ESTIMATEDVALUES_TRAINING_SERIES_NAME].EmptyPointStyle.Color = this.chart.Series[ESTIMATEDVALUES_TRAINING_SERIES_NAME].Color; 74 74 this.chart.Series[ESTIMATEDVALUES_TRAINING_SERIES_NAME].Points.DataBindXY(Content.ProblemData.TrainingIndizes.ToArray(), Content.EstimatedTrainingValues.ToArray()); 75 this.InsertEmptyPoints(this.chart.Series[ESTIMATEDVALUES_TRAINING_SERIES_NAME]); 75 76 this.chart.Series[ESTIMATEDVALUES_TRAINING_SERIES_NAME].Tag = Content; 76 this.chart.DataManipulator.InsertEmptyPoints(1, IntervalType.Number, ESTIMATEDVALUES_TRAINING_SERIES_NAME); 77 this.chart.Series[ESTIMATEDVALUES_TRAINING_SERIES_NAME].EmptyPointStyle.BorderWidth = 0; 78 this.chart.Series[ESTIMATEDVALUES_TRAINING_SERIES_NAME].EmptyPointStyle.MarkerStyle = MarkerStyle.None; 79 80 77 // test series 81 78 this.chart.Series.Add(ESTIMATEDVALUES_TEST_SERIES_NAME); 82 79 this.chart.Series[ESTIMATEDVALUES_TEST_SERIES_NAME].LegendText = ESTIMATEDVALUES_TEST_SERIES_NAME; 83 80 this.chart.Series[ESTIMATEDVALUES_TEST_SERIES_NAME].ChartType = SeriesChartType.FastLine; 84 81 this.chart.Series[ESTIMATEDVALUES_TEST_SERIES_NAME].Points.DataBindXY(Content.ProblemData.TestIndizes.ToArray(), Content.EstimatedTestValues.ToArray()); 82 this.InsertEmptyPoints(this.chart.Series[ESTIMATEDVALUES_TEST_SERIES_NAME]); 85 83 this.chart.Series[ESTIMATEDVALUES_TEST_SERIES_NAME].Tag = Content; 86 87 84 // series of remaining points 88 85 int[] allIndizes = Enumerable.Range(0, Content.ProblemData.Dataset.Rows).Except(Content.ProblemData.TrainingIndizes).Except(Content.ProblemData.TestIndizes).ToArray(); 89 86 var estimatedValues = Content.EstimatedValues.ToArray(); 90 87 List<double> allEstimatedValues = allIndizes.Select(index => estimatedValues[index]).ToList(); 91 92 88 this.chart.Series.Add(ESTIMATEDVALUES_ALL_SERIES_NAME); 93 89 this.chart.Series[ESTIMATEDVALUES_ALL_SERIES_NAME].LegendText = ESTIMATEDVALUES_ALL_SERIES_NAME; 94 90 this.chart.Series[ESTIMATEDVALUES_ALL_SERIES_NAME].ChartType = SeriesChartType.FastLine; 95 91 this.chart.Series[ESTIMATEDVALUES_ALL_SERIES_NAME].Points.DataBindXY(allIndizes, allEstimatedValues); 92 this.InsertEmptyPoints(this.chart.Series[ESTIMATEDVALUES_ALL_SERIES_NAME]); 96 93 this.chart.Series[ESTIMATEDVALUES_ALL_SERIES_NAME].Tag = Content; 97 this.chart.DataManipulator.InsertEmptyPoints(1, IntervalType.Number, ESTIMATEDVALUES_ALL_SERIES_NAME);98 this.chart.Series[ESTIMATEDVALUES_TRAINING_SERIES_NAME].EmptyPointStyle.BorderWidth = 0;99 this.chart.Series[ESTIMATEDVALUES_TRAINING_SERIES_NAME].EmptyPointStyle.MarkerStyle = MarkerStyle.None;100 94 this.ToggleSeriesData(this.chart.Series[ESTIMATEDVALUES_ALL_SERIES_NAME]); 101 95 102 96 UpdateCursorInterval(); 103 97 this.UpdateStripLines(); 98 } 99 } 100 101 private void InsertEmptyPoints(Series series) { 102 int i = 0; 103 while (i < series.Points.Count - 1) { 104 if (series.Points[i].IsEmpty) { 105 ++i; 106 continue; 107 } 108 109 var p1 = series.Points[i]; 110 var p2 = series.Points[i + 1]; 111 // check for consecutive indices 112 if ((int)p2.XValue - (int)p1.XValue != 1) { 113 // insert an empty point between p1 and p2 so that the line will be invisible (transparent) 114 var p = new DataPoint((int)((p1.XValue + p2.XValue) / 2), 0.0) { IsEmpty = true }; 115 series.Points.Insert(i + 1, p); 116 } 117 ++i; 104 118 } 105 119 } … … 204 218 if (series.Points.Count > 0) { //checks if series is shown 205 219 if (this.chart.Series.Any(s => s != series && s.Points.Count > 0)) { 206 series.Points.Clear();220 ClearPointsQuick(series.Points); 207 221 } 208 222 } else if (Content != null) { … … 227 241 } 228 242 series.Points.DataBindXY(indizes, predictedValues); 229 chart.DataManipulator.InsertEmptyPoints(1, IntervalType.Number, series.Name);243 this.InsertEmptyPoints(series); 230 244 chart.Legends[series.Legend].ForeColor = Color.Black; 231 245 UpdateCursorInterval(); 232 246 chart.Refresh(); 233 247 } 248 } 249 250 // workaround as per http://stackoverflow.com/questions/5744930/datapointcollection-clear-performance 251 private static void ClearPointsQuick(DataPointCollection points) { 252 points.SuspendUpdates(); 253 while (points.Count > 0) 254 points.RemoveAt(points.Count - 1); 255 points.ResumeUpdates(); 234 256 } 235 257
Note: See TracChangeset
for help on using the changeset viewer.