Changeset 14626 for branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Tracking
- Timestamp:
- 01/31/17 16:50:45 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Tracking/Analyzers/SymbolicDataAnalysisSchemaFrequencyAnalyzer.cs
r14427 r14626 156 156 var generation = Generation.Value; 157 157 158 var population = PopulationGraph.Vertices.Where(x => x.InDegree == 2 && x.Rank > generation - 1).ToList(); 159 var vertices = population.Where(x => x.InDegree == 2).OrderByDescending(x => x.Quality).ToList(); 158 // use all offspring produced by crossover (including those in the intermediate rank) 159 var vertices = PopulationGraph.Vertices.Where(x => x.InDegree == 2 && x.Rank > generation - 1).OrderByDescending(x => x.Quality).ToList(); 160 160 161 ResultCollection resultCollection; 161 162 if (Results.ContainsKey("Schema Frequencies")) { … … 169 170 var mostFrequentPerGeneration = new List<Tuple<string, double[]>>(); 170 171 172 // match the obtained schemas against the whole population 173 var population = PopulationGraph.Vertices.Where(x => x.Rank.IsAlmost(generation)).ToList(); 171 174 var trees = population.Select(x => x.Data).ToList(); 172 175 var qualities = population.Select(x => x.Quality).ToList(); 176 // cache similarity measures to speed up calculations 173 177 var genSimMatrix = new double[trees.Count, trees.Count]; 174 178 var phenSimMatrix = new double[trees.Count, trees.Count]; … … 180 184 } 181 185 } 182 var schemas = SchemaCreator.GenerateSchemas(vertices, MinimumSchemaLength, StrictSchemaMatching).ToList(); 186 187 var schemas = SchemaCreator.GenerateSchemas(vertices, MinimumSchemaLength, 0, StrictSchemaMatching).ToList(); 183 188 var schemaStrings = schemas.Select(x => x.Root.GetSubtree(0).GetSubtree(0).FormatToString(StrictSchemaMatching)).ToList(); 184 189 int[][] matchingIndices;
Note: See TracChangeset
for help on using the changeset viewer.