Changeset 12970 for branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic
- Timestamp:
- 09/25/15 19:25:30 (9 years ago)
- Location:
- branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Plugin.cs.frame
r12891 r12970 35 35 [PluginDependency("HeuristicLab.Core", "3.3")] 36 36 [PluginDependency("HeuristicLab.Data", "3.3")] 37 [PluginDependency("HeuristicLab.EvolutionTracking", "3.4")] 37 38 [PluginDependency("HeuristicLab.Encodings.SymbolicExpressionTreeEncoding", "3.4")] 38 39 [PluginDependency("HeuristicLab.Operators", "3.3")] -
branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Tracking/SchemaDiversification/SchemaEvaluator.cs
r12966 r12970 190 190 } 191 191 192 if (matchingIndividuals.Count < MinimumSchemaFrequency.Value * individuals.Count) {192 if (matchingIndividuals.Count < (int)Math.Max(2, Math.Round(MinimumSchemaFrequency.Value * individuals.Count))) { 193 193 ChangedTreesParameter.ActualValue = new IntValue(0); 194 194 return base.Apply(); … … 202 202 203 203 var oc = new OperationCollection(); 204 int n = (int)Math. Round(matchingIndividuals.Count * ReplacementRatio.Value);204 int n = (int)Math.Floor(matchingIndividuals.Count * ReplacementRatio.Value); 205 205 var individualsToReplace = RandomReplacement.Value ? matchingIndividuals.SampleRandomWithoutRepetition(random, n).ToList() 206 206 : matchingIndividuals.OrderBy(x => (DoubleValue)x.Variables["Quality"].Value).Take(n).ToList();
Note: See TracChangeset
for help on using the changeset viewer.