Changeset 16311 for branches/2845_EnhancedProgress/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionLineChartViewBase.cs
- Timestamp:
- 11/20/18 15:26:57 (6 years ago)
- Location:
- branches/2845_EnhancedProgress
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2845_EnhancedProgress
- Property svn:mergeinfo changed
-
branches/2845_EnhancedProgress/HeuristicLab.Problems.DataAnalysis.Views
- Property svn:mergeinfo changed
-
branches/2845_EnhancedProgress/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionLineChartViewBase.cs
r16308 r16311 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 6Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 20 20 #endregion 21 21 using System; 22 using System.Collections.Generic;23 22 using System.Drawing; 24 23 using System.Linq; … … 72 71 this.chart.Series[TARGETVARIABLE_SERIES_NAME].LegendText = TARGETVARIABLE_SERIES_NAME; 73 72 this.chart.Series[TARGETVARIABLE_SERIES_NAME].ChartType = SeriesChartType.FastLine; 74 this.chart.Series[TARGETVARIABLE_SERIES_NAME].Points.DataBindXY(Enumerable.Range(0, Content.ProblemData.Dataset.Rows).ToArray(), 75 Content.ProblemData.Dataset.GetDoubleValues(Content.ProblemData.TargetVariable).ToArray()); 73 74 var rows = Enumerable.Range(0, Content.ProblemData.Dataset.Rows).ToArray(); 75 var targetValues = Content.ProblemData.Dataset.GetDoubleValues(Content.ProblemData.TargetVariable); 76 77 78 this.chart.Series[TARGETVARIABLE_SERIES_NAME].Points.DataBindXY(rows.ToArray(), targetValues.Select(v => double.IsInfinity(v) ? double.NaN : v).ToArray()); 76 79 // training series 77 80 this.chart.Series.Add(ESTIMATEDVALUES_TRAINING_SERIES_NAME); … … 161 164 var targetValues = this.chart.Series[TARGETVARIABLE_SERIES_NAME].Points.Select(x => x.YValues[0]).DefaultIfEmpty(1.0); 162 165 double estimatedValuesRange = estimatedValues.Max() - estimatedValues.Min(); 163 double targetValuesRange = targetValues.Max() - targetValues.Min(); 166 double targetValuesRange = targetValues.Where(v => !double.IsInfinity(v) && !double.IsNaN(v)).Max() - 167 targetValues.Where(v => !double.IsInfinity(v) && !double.IsNaN(v)).Min(); 164 168 double interestingValuesRange = Math.Min(Math.Max(targetValuesRange, 1.0), Math.Max(estimatedValuesRange, 1.0)); 165 169 double digits = (int)Math.Log10(interestingValuesRange) - 3;
Note: See TracChangeset
for help on using the changeset viewer.