Changeset 17632
- Timestamp:
- 06/24/20 16:14:43 (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
r17623 r17632 91 91 92 92 var constraints = problemData.IntervalConstraints.Constraints.Where(c => c.Enabled); 93 var variableRanges = problemData.VariableRanges.Get ReadonlyDictionary();93 var variableRanges = problemData.VariableRanges.GetDictionary(); 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 ReadOnlyDictionary<string, Interval> variableRanges,105 IDictionary<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
r17627 r17632 120 120 121 121 var constraints = problemData.IntervalConstraints.Constraints.Where(c => c.Enabled); 122 var variableRanges = problemData.VariableRanges.Get ReadonlyDictionary();122 var variableRanges = problemData.VariableRanges.GetDictionary(); 123 123 124 124 var objectives = new List<double> {nmse}; … … 144 144 145 145 public static double ConstraintExceeded(IntervalConstraint constraint, IntervalInterpreter intervalInterpreter, 146 I ReadOnlyDictionary<string, Interval> variableRanges,146 IDictionary<string, Interval> variableRanges, 147 147 ISymbolicExpressionTree solution /*, bool splitting*/) { 148 148 if (constraint.Variable != null && !variableRanges.ContainsKey(constraint.Variable)) … … 182 182 } 183 183 184 public static double Normalize(double val, double min = 0, double max = 10e6) {185 return (val - min) / (max - min);186 }187 188 184 /* 189 185 * First objective is to maximize the Pearson R² value -
branches/3076_IA_evaluators_analyzers/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/Evaluators/SymbolicRegressionSingleObjectiveConstraintConstOptEvaluator.cs
r17621 r17632 44 44 45 45 var constraints = problemData.IntervalConstraints.EnabledConstraints; 46 var variableRanges = problemData.VariableRanges.Get ReadonlyDictionary();46 var variableRanges = problemData.VariableRanges.GetDictionary(); 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
r17621 r17632 47 47 48 48 var constraints = problemData.IntervalConstraints.EnabledConstraints; 49 var variableRanges = problemData.VariableRanges.Get ReadonlyDictionary();49 var variableRanges = problemData.VariableRanges.GetDictionary(); 50 50 var tree = solution; 51 51 -
branches/3076_IA_evaluators_analyzers/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SymbolicRegressionConstraintAnalyzer.cs
r17611 r17632 63 63 var results = ResultCollectionParameter.ActualValue; 64 64 var constraints = problemData.IntervalConstraints.EnabledConstraints; 65 var variableRanges = problemData.VariableRanges.Get ReadonlyDictionary();65 var variableRanges = problemData.VariableRanges.GetDictionary(); 66 66 var newDataTable = ConstraintViolationParameter.ActualValue; 67 67 … … 82 82 public static bool ConstraintSatisfied(IntervalConstraint constraint, 83 83 IntervalInterpreter intervalInterpreter, 84 I ReadOnlyDictionary<string, Interval> variableRanges,84 IDictionary<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 ReadOnlyDictionary<string, Interval> variableRanges,112 IDictionary<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
r17579 r17632 200 200 var problemData = solution.ProblemData; 201 201 var model = solution.Model; 202 var variableRanges = problemData.VariableRanges.Get ReadonlyDictionary();202 var variableRanges = problemData.VariableRanges.GetDictionary(); 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.