Changeset 16627
- Timestamp:
- 02/28/19 12:40:15 (6 years ago)
- Location:
- branches/2971_named_intervals
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SymbolicRegressionSolution.cs
r16589 r16627 29 29 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 30 30 using HeuristicLab.Problems.DataAnalysis.Implementation; 31 using HEAL.Attic; 31 32 32 33 namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Regression { … … 34 35 /// Represents a symbolic regression solution (model + data) and attributes of the solution like accuracy and complexity 35 36 /// </summary> 36 [Storable Class]37 [StorableType("CC27F20C-5925-406B-9C38-3C4B2B781C9F")] 37 38 [Item(Name = "SymbolicRegressionSolution", Description = "Represents a symbolic regression solution (model + data) and attributes of the solution like accuracy and complexity.")] 38 39 public sealed class SymbolicRegressionSolution : RegressionSolution, ISymbolicRegressionSolution { … … 101 102 } 102 103 103 private NamedIntervals IntervalEvaluaitonCollection => 104 (NamedIntervals) this[IntervalEvaluationResultName].Value; 104 105 public NamedIntervals IntervalEvaluationCollection { 106 get { return (NamedIntervals)this[IntervalEvaluationResultName].Value; } 107 private set { this[IntervalEvaluationResultName].Value = value; } 108 } 105 109 106 110 107 111 108 112 [StorableConstructor] 109 private SymbolicRegressionSolution( bool deserializing) : base(deserializing) { }113 private SymbolicRegressionSolution(StorableConstructorFlag _) : base(_) { } 110 114 private SymbolicRegressionSolution(SymbolicRegressionSolution original, Cloner cloner) 111 115 : base(original, cloner) { … … 130 134 RecalculateResults(); 131 135 132 var namedIntervalCollection = new NamedIntervals(); 133 Add(new Result(IntervalEvaluationResultName, "Results concerning the derivation of symbolic regression solution", namedIntervalCollection)); 134 GetIntervalEvaulations(namedIntervalCollection); 136 Add(new Result(IntervalEvaluationResultName, "Results concerning the derivation of symbolic regression solution", GetIntervalEvaluations())); 137 ; 135 138 } 136 139 … … 152 155 Add(new Result(EstimationLimitsResultsResultName, "Results concerning the estimation limits of symbolic regression solution", estimationLimitResults)); 153 156 CalculateResults(); 154 155 var namedIntervalCollection = new NamedIntervals();156 Add(new Result(IntervalEvaluationResultName, "Results concerning the derivation of symbolic regression solution", namedIntervalCollection));157 GetIntervalEvaulations(namedIntervalCollection);158 157 } 159 158 } … … 164 163 } 165 164 166 private void GetIntervalEvaulations(NamedIntervals intervalEvaluation) { 165 private NamedIntervals GetIntervalEvaluations() { 166 var intervalEvaluation = new NamedIntervals(); 167 167 var interpreter = new IntervalInterpreter(); 168 168 var variableRanges = (ProblemData as RegressionProblemData)?.VariableRangesParameter.Value.VariableIntervals; … … 181 181 } 182 182 } 183 return intervalEvaluation; 183 184 } 184 185 … … 196 197 TrainingNaNEvaluations = Model.Interpreter.GetSymbolicExpressionTreeValues(Model.SymbolicExpressionTree, ProblemData.Dataset, ProblemData.TrainingIndices).Count(double.IsNaN); 197 198 TestNaNEvaluations = Model.Interpreter.GetSymbolicExpressionTreeValues(Model.SymbolicExpressionTree, ProblemData.Dataset, ProblemData.TestIndices).Count(double.IsNaN); 199 200 IntervalEvaluationCollection = GetIntervalEvaluations(); 198 201 } 199 202 } -
branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/NamedIntervalsView.cs
r16586 r16627 47 47 public NamedIntervalsView() { 48 48 InitializeComponent(); 49 setColumnNames();50 49 dataGridView.AutoGenerateColumns = false; 51 50 dataGridView.AllowUserToAddRows = false; … … 69 68 70 69 protected void UpdateData() { 70 DataGridView.Rows.Clear(); 71 DataGridView.Columns.Clear(); 72 SetColumnNames(); 73 74 71 75 var variablesCount = Content.VariableIntervals.Count; 72 76 … … 102 106 } 103 107 104 protected void setColumnNames() {108 protected void SetColumnNames() { 105 109 dataGridView.Columns.Add("lowerBound", "Lower Bound"); 106 110 dataGridView.Columns.Add("upperBound", "Upper Bound");
Note: See TracChangeset
for help on using the changeset viewer.