Changeset 13221 for branches/DataAnalysis.ComplexityAnalyzer/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/MultiObjective/SymbolicRegressionMultiObjectiveTrainingBestSolutionAnalyzer.cs
- Timestamp:
- 11/17/15 15:57:52 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DataAnalysis.ComplexityAnalyzer/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/MultiObjective/SymbolicRegressionMultiObjectiveTrainingBestSolutionAnalyzer.cs
r13211 r13221 96 96 public override IOperation Apply() { 97 97 var operation = base.Apply(); 98 99 98 var paretoFront = TrainingBestSolutionsParameter.ActualValue; 100 99 … … 131 130 } 132 131 133 134 135 132 qualityToTreeSize.Rows.Clear(); 136 133 var trainingRow = new ScatterPlotDataRow("Training NMSE", "", sizeParetoFront.Select(x => new Point2D<double>(x.Model.SymbolicExpressionTree.Length, x.TrainingNormalizedMeanSquaredError))); 137 trainingRow.VisualProperties.PointSize = 5;134 trainingRow.VisualProperties.PointSize = 8; 138 135 qualityToTreeSize.Rows.Add(trainingRow); 139 136 … … 147 144 sizeParetoFront.Select(x => new Point2D<double>(x.Model.SymbolicExpressionTree.Length, 148 145 OnlineNormalizedMeanSquaredErrorCalculator.Calculate(targetValues, x.GetEstimatedValues(validationIndizes), out error)))); 149 validationRow.VisualProperties.PointSize = 5;146 validationRow.VisualProperties.PointSize = 7; 150 147 qualityToTreeSize.Rows.Add(validationRow); 151 148 } 152 153 double trainingArea = sizeParetoFront.Select(s => s.Model.SymbolicExpressionTree.Length * s.TrainingNormalizedMeanSquaredError).Average();154 double testArea = sizeParetoFront.Select(s => s.Model.SymbolicExpressionTree.Length * s.TestNormalizedMeanSquaredError).Average();155 156 ResultCollection paretoFrontResults;157 if (!ResultCollection.TryGetValue("Pareto Front Results", out result)) {158 paretoFrontResults = new ResultCollection();159 ResultCollection.Add(new Result("Pareto Front Results", paretoFrontResults));160 } else paretoFrontResults = (ResultCollection)result.Value;161 162 DoubleValue trainingAreaResult, testAreaResult, areaDifferenceResult, avgTrainingNMSE, avgTestNMSE;163 if (!paretoFrontResults.TryGetValue("Non Dominated Area (training)", out result)) {164 trainingAreaResult = new DoubleValue();165 paretoFrontResults.Add(new Result("Non Dominated Area (training)", trainingAreaResult));166 } else trainingAreaResult = (DoubleValue)result.Value;167 if (!paretoFrontResults.TryGetValue("Non Dominated Area (test)", out result)) {168 testAreaResult = new DoubleValue();169 paretoFrontResults.Add(new Result("Non Dominated Area (test)", testAreaResult));170 } else testAreaResult = (DoubleValue)result.Value;171 if (!paretoFrontResults.TryGetValue("Non Dominated Area Difference", out result)) {172 areaDifferenceResult = new DoubleValue();173 paretoFrontResults.Add(new Result("Non Dominated Area Difference", areaDifferenceResult));174 } else areaDifferenceResult = (DoubleValue)result.Value;175 if (!paretoFrontResults.TryGetValue("Average Training NMSE", out result)) {176 avgTrainingNMSE = new DoubleValue();177 paretoFrontResults.Add(new Result("Average Training NMSE", avgTrainingNMSE));178 } else avgTrainingNMSE = (DoubleValue)result.Value;179 if (!paretoFrontResults.TryGetValue("Average Test NMSE", out result)) {180 avgTestNMSE = new DoubleValue();181 paretoFrontResults.Add(new Result("Average Test NMSE", avgTestNMSE));182 } else avgTestNMSE = (DoubleValue)result.Value;183 184 trainingAreaResult.Value = trainingArea;185 testAreaResult.Value = testArea;186 areaDifferenceResult.Value = trainingArea - testArea;187 avgTrainingNMSE.Value = sizeParetoFront.Select(s => s.TrainingNormalizedMeanSquaredError).Average();188 avgTestNMSE.Value = sizeParetoFront.Select(s => s.TestNormalizedMeanSquaredError).Average();189 149 190 150 return operation;
Note: See TracChangeset
for help on using the changeset viewer.