Changeset 1743
- Timestamp:
- 05/06/09 16:51:10 (16 years ago)
- Location:
- trunk/sources/HeuristicLab.Selection.Uncertainty/v3.2
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Selection.Uncertainty/v3.2/HeuristicLab.Selection.Uncertainty.csproj
r1740 r1743 110 110 <Name>HeuristicLab.StatisticalAnalysis-3.2</Name> 111 111 </ProjectReference> 112 <ProjectReference Include="..\..\HeuristicLab.Tracing\3.2\HeuristicLab.Tracing-3.2.csproj"> 113 <Project>{EE2034D9-6E27-48A1-B855-42D45F69A4FC}</Project> 114 <Name>HeuristicLab.Tracing-3.2</Name> 115 </ProjectReference> 112 116 </ItemGroup> 113 117 <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> -
trunk/sources/HeuristicLab.Selection.Uncertainty/v3.2/UncertainTournamentSelector.cs
r1742 r1743 28 28 using HeuristicLab.Selection; 29 29 using HeuristicLab.StatisticalAnalysis; 30 using HeuristicLab.Tracing; 30 31 31 32 namespace HeuristicLab.Selection.Uncertainty { … … 54 55 double alpha = GetVariableValue<DoubleData>("SignificanceLevel", source, true).Data; 55 56 57 int insignificantCount = 0; 58 int equalRankListSize = 0; 56 59 for (int i = 0; i < selected; i++) { 57 60 if (source.SubScopes.Count < 1) throw new InvalidOperationException("No source scopes available to select."); … … 97 100 } 98 101 } 99 // else there's a statistical significant difference, but equal average qualities... can that happen? 102 // else there's a statistical significant difference, but equal average qualities... can that happen? in any case, nobody gets a rank increase 100 103 } 101 104 } 102 105 } 103 106 int selectedScopeIndex = 0; 104 if (equalRankList.Count == 0) 107 if (equalRankList.Count == 0) { 108 insignificantCount++; 105 109 selectedScopeIndex = tournamentGroupIndices[random.Next(groupSize)]; // no significance in all the solutions, select one randomly 106 else 110 } else { 111 equalRankListSize += equalRankList.Count; 107 112 selectedScopeIndex = tournamentGroupIndices[equalRankList[random.Next(equalRankList.Count)]]; // select among those with the highest rank randomly 108 113 } 109 114 IScope selectedScope = source.SubScopes[selectedScopeIndex]; 110 115 … … 116 121 } 117 122 } 123 Logger.Debug("Solutions selected: " + selected + ". Completely random selections: " + insignificantCount + ". Average size of highest rank pool: " + (double)equalRankListSize / (double)selected); 118 124 } 119 125 } -
trunk/sources/HeuristicLab.Selection.Uncertainty/v3.2/UncertaintyPlugin.cs
r1740 r1743 34 34 [Dependency(Dependency = "HeuristicLab.StatisticalAnalysis-3.2")] 35 35 [Dependency(Dependency = "HeuristicLab.Random-3.2")] 36 [Dependency(Dependency = "HeuristicLab.Tracing-3.2")] 36 37 public class UncertaintyPlugin : PluginBase { 37 38 }
Note: See TracChangeset
for help on using the changeset viewer.