Changeset 17878
- Timestamp:
- 03/12/21 08:24:04 (4 years ago)
- Location:
- branches/3076_IA_evaluators_analyzers/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3076_IA_evaluators_analyzers/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/MultiObjective/SymbolicRegressionMultiObjectiveMultiSoftConstraintEvaluator.cs
r17794 r17878 177 177 nmse = 1.0; 178 178 179 180 179 var objectives = new List<double> {nmse}; 181 ////var intervalInterpreter = new IntervalInterpreter() {UseIntervalSplitting = splitting};182 183 //var constraintObjectives = new List<double>();184 //foreach (var c in constraints) {185 // var penalty = ConstraintExceeded(c, intervalInterpreter, variableRanges,186 // solution);187 // var maxP = 0.1;188 189 // if (double.IsNaN(penalty) || double.IsInfinity(penalty) || penalty > maxP)190 // penalty = maxP;191 192 // constraintObjectives.Add(penalty);193 //}194 195 //objectives.AddRange(constraintObjectives);196 197 //return objectives.ToArray();198 199 180 var results = IntervalUtil.IntervalConstraintsViolation(constraints, estimator, intervalCollection, solution); 200 181 foreach (var result in results) { -
branches/3076_IA_evaluators_analyzers/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/Evaluators/SymbolicRegressionSingleObjectiveConstraintEvaluator.cs
r17792 r17878 16 16 [Item("Constraints Evaluator", "Calculates NMSE of a symbolic regression solution with respect to constraints.")] 17 17 [StorableType("27473973-DD8D-4375-997D-942E2280AE8E")] 18 class SymbolicRegressionSingleObjectiveConstraintEvaluator : SymbolicRegressionSingleObjectiveEvaluator {18 public class SymbolicRegressionSingleObjectiveConstraintEvaluator : SymbolicRegressionSingleObjectiveEvaluator { 19 19 #region Parameter/Properties 20 20 … … 24 24 25 25 private const string UseSoftConstraintsParameterName = "Use Soft Constraints Evaluation"; 26 27 //private const string PenaltyMultiplierParameterName = "Constraints Penalty Multiplier";28 26 29 27 private const string BoundsEstimatorParameterName = "Bounds estimator"; … … 40 38 public IFixedValueParameter<BoolValue> UseSoftConstraintsParameter => 41 39 (IFixedValueParameter<BoolValue>)Parameters[UseSoftConstraintsParameterName]; 42 43 //public IFixedValueParameter<DoubleValue> PenaltyMultiplierParameter =>44 //(IFixedValueParameter<DoubleValue>)Parameters[PenaltyMultiplierParameterName];45 40 46 41 public IValueParameter<IBoundsEstimator> BoundsEstimatorParameter => … … 122 117 "Define whether the constraints are penalized by soft or hard constraints.", new BoolValue(false))); 123 118 } 124 125 //if (!Parameters.ContainsKey(PenaltyMultiplierParameterName)) {126 // Parameters.Add(new FixedValueParameter<DoubleValue>(PenaltyMultiplierParameterName,127 // "Specify how hard constraints violations should be punished", new DoubleValue(1.0)));128 //}129 119 130 120 if (!Parameters.ContainsKey(BoundsEstimatorParameterName))
Note: See TracChangeset
for help on using the changeset viewer.