Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
02/26/15 15:33:40 (10 years ago)
Author:
bburlacu
Message:

#2326: Moved phenotypic diversity analyzers one level up (since they can be applied to both single- and multiobjective problems). Added wiring in the multiobjective problems. Changed base class to SolutionSimilarityCalculator and adjusted analyzers.

Location:
branches/SymbolicExpressionTreeDiversityAnalyzers/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4
Files:
3 edited
1 moved

Legend:

Unmodified
Added
Removed
  • branches/SymbolicExpressionTreeDiversityAnalyzers/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification-3.4.csproj

    r12029 r12086  
    186186    <Compile Include="ModelCreators\NormalDistributedThresholdsModelCreator.cs" />
    187187    <Compile Include="MultiObjective\SymbolicClassificationMultiObjectiveValidationBestSolutionAnalyzer.cs" />
    188     <Compile Include="SingleObjective\SymbolicClassificationPhenotypicDiversityAnalyzer.cs" />
     188    <Compile Include="SymbolicClassificationPhenotypicDiversityAnalyzer.cs" />
    189189    <Compile Include="SymbolicClassificationPruningAnalyzer.cs" />
    190190    <Compile Include="SymbolicClassificationSolutionImpactValuesCalculator.cs" />
  • branches/SymbolicExpressionTreeDiversityAnalyzers/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/MultiObjective/SymbolicClassificationMultiObjectiveProblem.cs

    r12012 r12086  
    2323using HeuristicLab.Core;
    2424using HeuristicLab.Data;
     25using HeuristicLab.Optimization;
    2526using HeuristicLab.Parameters;
    2627using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     
    105106      Operators.Add(new SymbolicClassificationMultiObjectiveTrainingBestSolutionAnalyzer());
    106107      Operators.Add(new SymbolicClassificationMultiObjectiveValidationBestSolutionAnalyzer());
     108      Operators.Add(new SymbolicExpressionTreePhenotypicSimilarityCalculator());
     109      Operators.Add(new SymbolicClassificationPhenotypicDiversityAnalyzer(Operators.OfType<SymbolicExpressionTreePhenotypicSimilarityCalculator>()) {
     110        DiversityResultName = "Phenotypic Diversity"
     111      });
    107112      ParameterizeOperators();
    108113    }
     
    135140          op.ModelCreatorParameter.ActualName = ModelCreatorParameter.Name;
    136141      }
     142
     143      foreach (var op in Operators.OfType<ISolutionSimilarityCalculator>()) {
     144        op.SolutionVariableName = SolutionCreator.SymbolicExpressionTreeParameter.ActualName;
     145        op.QualityVariableName = Evaluator.QualitiesParameter.ActualName;
     146
     147        if (op is SymbolicExpressionTreePhenotypicSimilarityCalculator) {
     148          var phenotypicSimilarityCalculator = (SymbolicExpressionTreePhenotypicSimilarityCalculator)op;
     149          phenotypicSimilarityCalculator.ProblemData = ProblemData;
     150          phenotypicSimilarityCalculator.Interpreter = SymbolicExpressionTreeInterpreter;
     151        }
     152      }
    137153    }
    138154  }
  • branches/SymbolicExpressionTreeDiversityAnalyzers/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectiveProblem.cs

    r12075 r12086  
    149149      }
    150150
    151       foreach (var op in Operators.OfType<ISingleObjectiveSolutionSimilarityCalculator>()) {
     151      foreach (var op in Operators.OfType<ISolutionSimilarityCalculator>()) {
    152152        op.SolutionVariableName = SolutionCreator.SymbolicExpressionTreeParameter.ActualName;
    153153        op.QualityVariableName = Evaluator.QualityParameter.ActualName;
  • branches/SymbolicExpressionTreeDiversityAnalyzers/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SymbolicClassificationPhenotypicDiversityAnalyzer.cs

    r12079 r12086  
    7676    #endregion
    7777
    78     public SymbolicClassificationPhenotypicDiversityAnalyzer(IEnumerable<ISingleObjectiveSolutionSimilarityCalculator> validSimilarityCalculators)
     78    public SymbolicClassificationPhenotypicDiversityAnalyzer(IEnumerable<ISolutionSimilarityCalculator> validSimilarityCalculators)
    7979      : base(validSimilarityCalculators) {
    8080      #region add parameters
     
    123123        var evaluatedValues = new ItemArray<DoubleArray>(trees.Length);
    124124        for (int i = 0; i < trees.Length; ++i) {
    125           var model =
    126             (IDiscriminantFunctionClassificationModel)
    127               modelCreator.CreateSymbolicDiscriminantFunctionClassificationModel(trees[i], interpreter,
    128                 estimationLimits.Lower, estimationLimits.Upper);
     125          var model = (IDiscriminantFunctionClassificationModel)modelCreator.CreateSymbolicDiscriminantFunctionClassificationModel(trees[i], interpreter, estimationLimits.Lower, estimationLimits.Upper);
    129126          model.RecalculateModelParameters(problemData, rows);
    130127          var values = UseClassValues ? model.GetEstimatedClassValues(ds, rows) : model.GetEstimatedValues(ds, rows);
Note: See TracChangeset for help on using the changeset viewer.