Free cookie consent management tool by TermsFeed Policy Generator

Changeset 1743


Ignore:
Timestamp:
05/06/09 16:51:10 (15 years ago)
Author:
abeham
Message:

Adding log messages to evaluate if this works at all (#611)

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  
    110110      <Name>HeuristicLab.StatisticalAnalysis-3.2</Name>
    111111    </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>
    112116  </ItemGroup>
    113117  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
  • trunk/sources/HeuristicLab.Selection.Uncertainty/v3.2/UncertainTournamentSelector.cs

    r1742 r1743  
    2828using HeuristicLab.Selection;
    2929using HeuristicLab.StatisticalAnalysis;
     30using HeuristicLab.Tracing;
    3031
    3132namespace HeuristicLab.Selection.Uncertainty {
     
    5455      double alpha = GetVariableValue<DoubleData>("SignificanceLevel", source, true).Data;
    5556
     57      int insignificantCount = 0;
     58      int equalRankListSize = 0;
    5659      for (int i = 0; i < selected; i++) {
    5760        if (source.SubScopes.Count < 1) throw new InvalidOperationException("No source scopes available to select.");
     
    97100                }
    98101              }
    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
    100103            }
    101104          }
    102105        }
    103106        int selectedScopeIndex = 0;
    104         if (equalRankList.Count == 0)
     107        if (equalRankList.Count == 0) {
     108          insignificantCount++;
    105109          selectedScopeIndex = tournamentGroupIndices[random.Next(groupSize)]; // no significance in all the solutions, select one randomly
    106         else
     110        } else {
     111          equalRankListSize += equalRankList.Count;
    107112          selectedScopeIndex = tournamentGroupIndices[equalRankList[random.Next(equalRankList.Count)]]; // select among those with the highest rank randomly
    108 
     113        }
    109114        IScope selectedScope = source.SubScopes[selectedScopeIndex];
    110115
     
    116121        }
    117122      }
     123      Logger.Debug("Solutions selected: " + selected + ". Completely random selections: " + insignificantCount + ". Average size of highest rank pool: " + (double)equalRankListSize / (double)selected);
    118124    }
    119125  }
  • trunk/sources/HeuristicLab.Selection.Uncertainty/v3.2/UncertaintyPlugin.cs

    r1740 r1743  
    3434  [Dependency(Dependency = "HeuristicLab.StatisticalAnalysis-3.2")]
    3535  [Dependency(Dependency = "HeuristicLab.Random-3.2")]
     36  [Dependency(Dependency = "HeuristicLab.Tracing-3.2")]
    3637  public class UncertaintyPlugin : PluginBase {
    3738  }
Note: See TracChangeset for help on using the changeset viewer.