- Timestamp:
- 05/08/19 15:55:01 (5 years ago)
- Location:
- branches/2971_named_intervals
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/SymbolicRegressionConstraintAnalyzer.cs
r16921 r16927 72 72 var results = ResultCollectionParameter.ActualValue; 73 73 var constraints = problemData.IntervalConstraints.Constraints.Where(x => x.Enabled); 74 var variableRanges = problemData.VariableRanges. getIntervals();74 var variableRanges = problemData.VariableRanges.GetIntervals(); 75 75 76 76 if (!results.ContainsKey(ConstraintViolationsResultName)) { -
branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SymbolicRegressionSolution.cs
r16921 r16927 1 #region License Information1 #region License Information 2 2 /* HeuristicLab 3 3 * Copyright (C) 2002-2019 Heuristic and Evolutionary Algorithms Laboratory (HEAL) … … 179 179 var problemData = solution.ProblemData; 180 180 var model = solution.Model; 181 var variableRanges = problemData.VariableRanges. getIntervals();181 var variableRanges = problemData.VariableRanges.GetIntervals(); 182 182 183 intervalEvaluation.VariableIntervals.Add($"Target {problemData.TargetVariable}", new Interval(variableRanges[problemData.TargetVariable].LowerBound, variableRanges[problemData.TargetVariable].UpperBound)); 184 intervalEvaluation.VariableIntervals.Add("Model Interval", interpreter.GetSymbolicExpressionTreeInterval(model.SymbolicExpressionTree, variableRanges)); 185 183 intervalEvaluation.AddInterval($"Target {problemData.TargetVariable}", new Interval(variableRanges[problemData.TargetVariable].LowerBound, variableRanges[problemData.TargetVariable].UpperBound)); 184 intervalEvaluation.AddInterval("Model Interval", interpreter.GetSymbolicExpressionTreeInterval(model.SymbolicExpressionTree, variableRanges)); 186 185 foreach (var inputVariable in model.VariablesUsedForPrediction.OrderBy(v => v, new NaturalStringComparer())) { 187 186 var derivedModel = DerivativeCalculator.Derive(model.SymbolicExpressionTree, inputVariable); 188 187 var derivedResultInterval = interpreter.GetSymbolicExpressionTreeInterval(derivedModel, variableRanges); 189 188 190 intervalEvaluation. VariableIntervals.Add(" \u2202f/\u2202" + inputVariable,189 intervalEvaluation.AddInterval(" ∂f/∂" + inputVariable, 191 190 new Interval(derivedResultInterval.LowerBound, derivedResultInterval.UpperBound)); 192 191 } -
branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/InteractiveSymbolicDataAnalysisSolutionSimplifierView.cs
r16921 r16927 213 213 if (regressionProblemData != null) { 214 214 var interpreter = new IntervalInterpreter(); 215 var variableRanges = regressionProblemData.VariableRanges. getIntervals();215 var variableRanges = regressionProblemData.VariableRanges.GetIntervals(); 216 216 IDictionary<ISymbolicExpressionTreeNode, Interval> intervals; 217 217 interpreter.GetSymbolicExpressionTreeIntervals(tree, variableRanges, out intervals); -
branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis.Views/3.4/IntervalCollectionView.cs
r16921 r16927 69 69 70 70 71 var variablesCount = Content. getIntervals().Count;71 var variablesCount = Content.GetIntervals().Count; 72 72 73 73 DataGridViewRow[] rows = new DataGridViewRow[variablesCount]; … … 93 93 for (var i = 0; i < dataGridView.RowCount; ++i) { 94 94 var key = (string)dataGridView.Rows[i].HeaderCell.Value; 95 dataGridView.Rows[i].Cells[0].Value = Content. getInterval(key).LowerBound;96 dataGridView.Rows[i].Cells[1].Value = Content. getInterval(key).UpperBound;95 dataGridView.Rows[i].Cells[0].Value = Content.GetInterval(key).LowerBound; 96 dataGridView.Rows[i].Cells[1].Value = Content.GetInterval(key).UpperBound; 97 97 } 98 98 } 99 99 100 100 private void SetRowsHeader() { 101 for (var i = 0; i < Content. getIntervals().Count; ++i) {102 var item = Content. getIntervals().ElementAt(i);101 for (var i = 0; i < Content.GetIntervals().Count; ++i) { 102 var item = Content.GetIntervals().ElementAt(i); 103 103 dataGridView.Rows[i].HeaderCell.Value = item.Key; 104 104 } … … 115 115 if (e.ColumnIndex < 0 || e.RowIndex < 0) return; 116 116 117 var lowerBound = e.ColumnIndex == 0 ? double.Parse(dataGridView.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString()) : Content. getInterval(key).LowerBound;118 var upperBound = e.ColumnIndex == 1 ? double.Parse(dataGridView.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString()) : Content. getInterval(key).UpperBound;117 var lowerBound = e.ColumnIndex == 0 ? double.Parse(dataGridView.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString()) : Content.GetInterval(key).LowerBound; 118 var upperBound = e.ColumnIndex == 1 ? double.Parse(dataGridView.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString()) : Content.GetInterval(key).UpperBound; 119 119 120 120 // update if there was a change 121 if (lowerBound != Content. getInterval(key).LowerBound ||122 upperBound != Content. getInterval(key).UpperBound)123 Content. VariableIntervals[key] = new Interval(lowerBound, upperBound);121 if (lowerBound != Content.GetInterval(key).LowerBound || 122 upperBound != Content.GetInterval(key).UpperBound) 123 Content.SetInterval(key, new Interval(lowerBound, upperBound)); 124 124 } 125 125
Note: See TracChangeset
for help on using the changeset viewer.