- Timestamp:
- 11/01/18 19:59:49 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Crossovers/SymbolicDataAnalysisExpressionDiversityPreservingCrossover.cs
r16263 r16270 81 81 if (proportionalSampling) { 82 82 var p = internalCrossoverPointProbability; 83 var weights0 = nodes0.Select(x => x.Is Child? 1 - p : p);83 var weights0 = nodes0.Select(x => x.IsLeaf ? 1 - p : p); 84 84 sampled0 = nodes0.SampleProportionalWithoutRepetition(random, nodes0.Length, weights0, windowing: windowing).ToArray(); 85 85 86 var weights1 = nodes1.Select(x => x.Is Child? 1 - p : p);86 var weights1 = nodes1.Select(x => x.IsLeaf ? 1 - p : p); 87 87 sampled1 = nodes1.SampleProportionalWithoutRepetition(random, nodes1.Length, weights1, windowing: windowing).ToArray(); 88 88 } else { … … 133 133 134 134 if (chooseInternal) { 135 list.AddRange(nodes.Where(x => !x.Is Child&& x.Data.Parent != null));135 list.AddRange(nodes.Where(x => !x.IsLeaf && x.Data.Parent != null)); 136 136 } 137 137 if (!chooseInternal || list.Count == 0) { 138 list.AddRange(nodes.Where(x => x.Is Child&& x.Data.Parent != null));138 list.AddRange(nodes.Where(x => x.IsLeaf && x.Data.Parent != null)); 139 139 } 140 140
Note: See TracChangeset
for help on using the changeset viewer.