Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/21/10 19:58:45 (14 years ago)
Author:
swinkler
Message:

Added abstract base class for population diversity analyzers for symbolic regression; simplified management of population diversity analyzers in symbolic regression problem base. (#1278)

Location:
branches/DataAnalysis.PopulationDiversityAnalysis/HeuristicLab.Problems.DataAnalysis.Regression/3.3
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • branches/DataAnalysis.PopulationDiversityAnalysis/HeuristicLab.Problems.DataAnalysis.Regression/3.3/HeuristicLab.Problems.DataAnalysis.Regression-3.3.csproj

    r4881 r4885  
    182182    <Compile Include="SupportVectorRegression\SupportVectorRegressionSolution.cs" />
    183183    <Compile Include="Symbolic\Analyzers\BestSymbolicRegressionSolutionAnalyzer.cs" />
     184    <Compile Include="Symbolic\Analyzers\SymbolicRegressionPopulationDiversityAnalyzer.cs" />
    184185    <Compile Include="Symbolic\Analyzers\VariablesUsagePopulationDiversityAnalyzer.cs" />
    185186    <Compile Include="Symbolic\Analyzers\FixedValidationBestScaledSymbolicRegressionSolutionAnalyzer.cs" />
  • branches/DataAnalysis.PopulationDiversityAnalysis/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Analyzers/VariablesUsagePopulationDiversityAnalyzer.cs

    r4882 r4885  
    4141  [Item("VariablesUsagePopulationDiversityAnalysisOperator", "An operator that analyzes the population diversity with respect to the sets of used variables.")]
    4242  [StorableClass]
    43   public sealed class VariablesUsagePopulationDiversityAnalyzer : PopulationDiversityAnalyzer<SymbolicExpressionTree>, ISymbolicRegressionAnalyzer {
    44 
    45     private const string ProblemDataParameterName = "ProblemData";
    46 
    47     public IValueLookupParameter<DataAnalysisProblemData> ProblemDataParameter {
    48       get { return (IValueLookupParameter<DataAnalysisProblemData>)Parameters[ProblemDataParameterName]; }
    49     }
    50     public DataAnalysisProblemData ProblemData {
    51       get { return ProblemDataParameter.ActualValue; }
    52     }
    53 
    54     #region ISymbolicRegressionAnalyzer Members
    55 
    56     public ScopeTreeLookupParameter<SymbolicExpressionTree> SymbolicExpressionTreeParameter {
    57       get { return base.SolutionParameter; }
    58     }
    59 
    60     public new ILookupParameter<ResultCollection> ResultsParameter {
    61       get { return base.ResultsParameter; }
    62     }
    63 
    64     #endregion
     43  public sealed class VariablesUsagePopulationDiversityAnalyzer : SymbolicRegressionPopulationDiversityAnalyzer {
    6544
    6645    [StorableConstructor]
    6746    private VariablesUsagePopulationDiversityAnalyzer(bool deserializing) : base(deserializing) { }
    6847    private VariablesUsagePopulationDiversityAnalyzer(VariablesUsagePopulationDiversityAnalyzer original, Cloner cloner) : base(original, cloner) { }
    69     public VariablesUsagePopulationDiversityAnalyzer() : base() {
    70       Parameters.Add(new ValueLookupParameter<DataAnalysisProblemData>(ProblemDataParameterName, "The problem data for which the symbolic expression tree is a solution."));
    71     }
     48    public VariablesUsagePopulationDiversityAnalyzer() : base() { }
    7249
    7350    public override IDeepCloneable Clone(Cloner cloner) {
  • branches/DataAnalysis.PopulationDiversityAnalysis/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/SymbolicRegressionProblemBase.cs

    r4881 r4885  
    147147    }
    148148
    149     private VariablesUsagePopulationDiversityAnalyzer VariablesUsagePopulationDiversityAnalyzer {
    150       get { return operators.OfType<VariablesUsagePopulationDiversityAnalyzer>().FirstOrDefault(); }
    151     }
    152 
    153149    #endregion
    154150
     
    330326          varFreqAnalyzer.ProblemDataParameter.ActualName = DataAnalysisProblemDataParameter.Name;
    331327        }
    332         var populationDiversityAnalyzer = analyzer as HeuristicLab.Analysis.PopulationDiversityAnalyzer<SymbolicExpressionTree>;
     328        var populationDiversityAnalyzer = analyzer as SymbolicRegressionPopulationDiversityAnalyzer;
    333329        if (populationDiversityAnalyzer != null) {
    334           // ??? VariablesUsagePopulationDiversityAnalysisOperator.MaximizationParameter.ActualName =
    335           VariablesUsagePopulationDiversityAnalyzer.SolutionParameter.ActualName = SolutionCreator.SymbolicExpressionTreeParameter.ActualName;
    336           // ??? VariablesUsagePopulationDiversityAnalysisOperator.QualityParameter.ActualName
    337           VariablesUsagePopulationDiversityAnalyzer.ResultsParameter.ActualName = "Results";
    338         }
    339         if (VariablesUsagePopulationDiversityAnalyzer != null) {
    340           VariablesUsagePopulationDiversityAnalyzer.ProblemDataParameter.ActualName = DataAnalysisProblemDataParameter.Name;
     330          populationDiversityAnalyzer.ProblemDataParameter.ActualName = DataAnalysisProblemDataParameter.Name;
     331          // ??? populationDiversityAnalyzer.MaximizationParameter.ActualName =
     332          populationDiversityAnalyzer.SolutionParameter.ActualName = SolutionCreator.SymbolicExpressionTreeParameter.ActualName;
     333          // ??? populationDiversityAnalyzer.QualityParameter.ActualName
     334          populationDiversityAnalyzer.ResultsParameter.ActualName = "Results";
    341335        }
    342336      }
Note: See TracChangeset for help on using the changeset viewer.