- Timestamp:
- 08/31/10 18:25:03 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DataAnalysis/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Analyzers/SymbolicRegressionTournamentPruning.cs
r4328 r4350 126 126 public IValueLookupParameter<BoolValue> ApplyPruningParameter { 127 127 get { return (IValueLookupParameter<BoolValue>)Parameters["ApplyPruning"]; } 128 } 129 public IValueLookupParameter<IntValue> MinimalTreeSizeParameter { 130 get { return (IValueLookupParameter<IntValue>)Parameters["MinimalTreeSize"]; } 128 131 } 129 132 #endregion … … 214 217 Parameters.Add(new LookupParameter<ResultCollection>(ResultsParameterName, "The results collection.")); 215 218 Parameters.Add(new ValueLookupParameter<PercentValue>("RelativeNumberOfEvaluatedRows", new PercentValue(1.0))); 219 Parameters.Add(new ValueLookupParameter<IntValue>("MinimalTreeSize", new IntValue(15))); 216 220 } 217 221 … … 233 237 if (!Parameters.ContainsKey("RelativeNumberOfEvaluatedRows")) { 234 238 Parameters.Add(new ValueLookupParameter<PercentValue>("RelativeNumberOfEvaluatedRows", new PercentValue(1.0))); 239 } 240 if (!Parameters.ContainsKey("MinimalTreeSize")) { 241 Parameters.Add(new ValueLookupParameter<IntValue>("MinimalTreeSize", new IntValue(15))); 235 242 } 236 243 … … 261 268 SymbolicExpressionTreeInterpreter, Evaluator, Maximization.Value, 262 269 LowerEstimationLimit.Value, UpperEstimationLimit.Value, 263 M axPruningRatio.Value, QualityGainWeight.Value);270 MinimalTreeSizeParameter.ActualValue.Value, MaxPruningRatio.Value, QualityGainWeight.Value); 264 271 } 265 272 } … … 271 278 ISymbolicExpressionTreeInterpreter interpreter, ISymbolicRegressionEvaluator evaluator, bool maximization, 272 279 double lowerEstimationLimit, double upperEstimationLimit, 273 double maxPruningRatio, double qualityGainWeight) { 274 280 int minTreeSize, double maxPruningRatio, double qualityGainWeight) { 281 282 275 283 int originalSize = tree.Size; 276 277 284 // min size of the resulting pruned tree 278 285 int minPrunedSize = (int)(originalSize * (1 - maxPruningRatio)); 286 minPrunedSize = Math.Max(minPrunedSize, minTreeSize); 279 287 280 288 // use the same subset of rows for all iterations and for all pruning tournaments
Note: See TracChangeset
for help on using the changeset viewer.