Changeset 17996 for branches/3087_Ceres_Integration/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views
- Timestamp:
- 06/27/21 15:26:06 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3087_Ceres_Integration/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views/3.4/SymbolicRegressionSolutionErrorCharacteristicsCurveView.cs
r17991 r17996 26 26 using HeuristicLab.Algorithms.DataAnalysis; 27 27 using HeuristicLab.MainForm; 28 using HeuristicLab.PluginInfrastructure;29 28 using HeuristicLab.Problems.DataAnalysis.Views; 30 29 … … 44 43 private IRegressionSolution CreateLinearRegressionSolution() { 45 44 if (Content == null) throw new InvalidOperationException(); 45 double rmse, cvRmsError; 46 46 var problemData = (IRegressionProblemData)ProblemData.Clone(); 47 47 if (!problemData.TrainingIndices.Any()) return null; // don't create an LR model if the problem does not have a training set (e.g. loaded into an existing model) … … 87 87 newProblemData.TestPartition.End = problemData.TestPartition.End; 88 88 89 try { 90 var solution = LinearRegression.CreateSolution(newProblemData, out _, out _, out _); 91 solution.Name = "Baseline (linear subset)"; 92 return solution; 93 } catch (NotSupportedException e) { 94 ErrorHandling.ShowErrorDialog("Could not create a linear regression solution.", e); 95 } catch (ArgumentException e) { 96 ErrorHandling.ShowErrorDialog("Could not create a linear regression solution.", e); 97 } 98 return null; 89 var solution = LinearRegression.CreateLinearRegressionSolution(newProblemData, out rmse, out cvRmsError); 90 solution.Name = "Baseline (linear subset)"; 91 return solution; 99 92 } 100 93 … … 106 99 if (Content.Model.SymbolicExpressionTree.IterateNodesPrefix().OfType<LaggedVariableTreeNode>().Any()) yield break; 107 100 108 var linearRegressionSolution = CreateLinearRegressionSolution(); 109 if (linearRegressionSolution != null) yield return linearRegressionSolution; 101 yield return CreateLinearRegressionSolution(); 110 102 } 111 103 }
Note: See TracChangeset
for help on using the changeset viewer.