Changeset 17991 for branches/3087_Ceres_Integration/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views/3.4/SymbolicRegressionSolutionErrorCharacteristicsCurveView.cs
- Timestamp:
- 06/16/21 21:35:37 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3087_Ceres_Integration/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views/3.4/SymbolicRegressionSolutionErrorCharacteristicsCurveView.cs
r17180 r17991 26 26 using HeuristicLab.Algorithms.DataAnalysis; 27 27 using HeuristicLab.MainForm; 28 using HeuristicLab.PluginInfrastructure; 28 29 using HeuristicLab.Problems.DataAnalysis.Views; 29 30 … … 43 44 private IRegressionSolution CreateLinearRegressionSolution() { 44 45 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 var solution = LinearRegression.CreateLinearRegressionSolution(newProblemData, out rmse, out cvRmsError); 90 solution.Name = "Baseline (linear subset)"; 91 return solution; 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; 92 99 } 93 100 … … 99 106 if (Content.Model.SymbolicExpressionTree.IterateNodesPrefix().OfType<LaggedVariableTreeNode>().Any()) yield break; 100 107 101 yield return CreateLinearRegressionSolution(); 108 var linearRegressionSolution = CreateLinearRegressionSolution(); 109 if (linearRegressionSolution != null) yield return linearRegressionSolution; 102 110 } 103 111 }
Note: See TracChangeset
for help on using the changeset viewer.