Changeset 17636 for branches/3076_IA_evaluators_analyzers
- Timestamp:
- 06/29/20 15:45:24 (4 years ago)
- Location:
- branches/3076_IA_evaluators_analyzers/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3076_IA_evaluators_analyzers/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/MultiObjective/SymbolicRegressionMultiObjectiveMultiHardConstraintEvaluator.cs
r17632 r17636 91 91 92 92 var constraints = problemData.IntervalConstraints.Constraints.Where(c => c.Enabled); 93 var variableRanges = problemData.VariableRanges.Get Dictionary();93 var variableRanges = problemData.VariableRanges.GetReadonlyDictionary(); 94 94 95 95 var objectives = new List<double> {nmse}; //Add r² to resultlist … … 103 103 104 104 private static double ConstraintExceeded(IntervalConstraint constraint, IntervalInterpreter intervalInterpreter, 105 I Dictionary<string, Interval> variableRanges,105 IReadOnlyDictionary<string, Interval> variableRanges, 106 106 ISymbolicExpressionTree solution) { 107 107 return SymbolicRegressionConstraintAnalyzer.ConstraintSatisfied(constraint, new IntervalInterpreter(), -
branches/3076_IA_evaluators_analyzers/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/MultiObjective/SymbolicRegressionMultiObjectiveMultiSoftConstraintEvaluator.cs
r17632 r17636 120 120 121 121 var constraints = problemData.IntervalConstraints.Constraints.Where(c => c.Enabled); 122 var variableRanges = problemData.VariableRanges.Get Dictionary();122 var variableRanges = problemData.VariableRanges.GetReadonlyDictionary(); 123 123 124 124 var objectives = new List<double> {nmse}; … … 144 144 145 145 public static double ConstraintExceeded(IntervalConstraint constraint, IntervalInterpreter intervalInterpreter, 146 I Dictionary<string, Interval> variableRanges,146 IReadOnlyDictionary<string, Interval> variableRanges, 147 147 ISymbolicExpressionTree solution /*, bool splitting*/) { 148 148 if (constraint.Variable != null && !variableRanges.ContainsKey(constraint.Variable)) … … 189 189 get { 190 190 var objectives = new List<bool> {false}; //First NMSE ==> min 191 objectives.AddRange(Enumerable.Repeat(false, 3)); //Constraints ==> min191 objectives.AddRange(Enumerable.Repeat(false, 2)); //Constraints ==> min 192 192 193 193 return objectives; -
branches/3076_IA_evaluators_analyzers/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/Evaluators/SymbolicRegressionSingleObjectiveConstraintConstOptEvaluator.cs
r17632 r17636 44 44 45 45 var constraints = problemData.IntervalConstraints.EnabledConstraints; 46 var variableRanges = problemData.VariableRanges.Get Dictionary();46 var variableRanges = problemData.VariableRanges.GetReadonlyDictionary(); 47 47 48 48 if (!SymbolicRegressionConstraintAnalyzer.ConstraintsSatisfied(constraints, variableRanges, tree)) return 0; -
branches/3076_IA_evaluators_analyzers/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/Evaluators/SymbolicRegressionSingleObjectiveConstraintPearsonRSquaredEvaluator.cs
r17632 r17636 47 47 48 48 var constraints = problemData.IntervalConstraints.EnabledConstraints; 49 var variableRanges = problemData.VariableRanges.Get Dictionary();49 var variableRanges = problemData.VariableRanges.GetReadonlyDictionary(); 50 50 var tree = solution; 51 51 -
branches/3076_IA_evaluators_analyzers/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SymbolicRegressionConstraintAnalyzer.cs
r17632 r17636 63 63 var results = ResultCollectionParameter.ActualValue; 64 64 var constraints = problemData.IntervalConstraints.EnabledConstraints; 65 var variableRanges = problemData.VariableRanges.Get Dictionary();65 var variableRanges = problemData.VariableRanges.GetReadonlyDictionary(); 66 66 var newDataTable = ConstraintViolationParameter.ActualValue; 67 67 … … 82 82 public static bool ConstraintSatisfied(IntervalConstraint constraint, 83 83 IntervalInterpreter intervalInterpreter, 84 I Dictionary<string, Interval> variableRanges,84 IReadOnlyDictionary<string, Interval> variableRanges, 85 85 ISymbolicExpressionTree solution) { 86 86 if (constraint.Variable != null && !variableRanges.ContainsKey(constraint.Variable)) … … 110 110 111 111 public static bool ConstraintsSatisfied(IEnumerable<IntervalConstraint> constraints, 112 I Dictionary<string, Interval> variableRanges,112 IReadOnlyDictionary<string, Interval> variableRanges, 113 113 ISymbolicExpressionTree solution) { 114 114 var intervalInterpreter = new IntervalInterpreter(); -
branches/3076_IA_evaluators_analyzers/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SymbolicRegressionSolution.cs
r17632 r17636 200 200 var problemData = solution.ProblemData; 201 201 var model = solution.Model; 202 var variableRanges = problemData.VariableRanges.Get Dictionary();202 var variableRanges = problemData.VariableRanges.GetReadonlyDictionary(); 203 203 204 204 intervalEvaluation.AddInterval($"Target {problemData.TargetVariable}", new Interval(variableRanges[problemData.TargetVariable].LowerBound, variableRanges[problemData.TargetVariable].UpperBound));
Note: See TracChangeset
for help on using the changeset viewer.