Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
01/16/16 15:39:03 (8 years ago)
Author:
bburlacu
Message:

#1772: Fixed the way operator improvement is calculated so it also works when a diversification strategy is applied (introducing multiple intermediate vertices between parent and child). Minor code refactoring in the diversification operators. Fixed very small typo in the BeforeManipulatorOperator.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Tracking/SchemaDiversification/SchemaEvaluator.cs

    r13496 r13527  
    143143    };
    144144
     145    [Storable]
    145146    public ISymbolicExpressionTree Schema { get; set; }
    146147
    147148    [Storable]
    148     private readonly UpdateEstimatedValuesOperator updateEstimatedValuesOperator;
     149    private readonly UpdateQualityOperator updateQualityOperator;
    149150
    150151    [StorableHook(HookType.AfterDeserialization)]
     
    156157    public SchemaEvaluator() {
    157158      qm = new QueryMatch(comp) { MatchParents = true };
    158       this.updateEstimatedValuesOperator = new UpdateEstimatedValuesOperator();
     159      this.updateQualityOperator = new UpdateQualityOperator();
    159160      #region add parameters
    160161      Parameters.Add(new LookupParameter<ISymbolicExpressionTree>(SchemaParameterName, "The current schema to be evaluated"));
     
    185186
    186187    protected SchemaEvaluator(SchemaEvaluator original, Cloner cloner) : base(original, cloner) {
    187       this.comp = original.comp == null ? new SymbolicExpressionTreeNodeEqualityComparer {
    188         MatchConstantValues = false,
    189         MatchVariableWeights = false,
    190         MatchVariableNames = true
    191       } : (ISymbolicExpressionTreeNodeEqualityComparer)original.comp.Clone();
     188      this.comp = new SymbolicExpressionTreeNodeEqualityComparer();
    192189      this.qm = new QueryMatch(comp) { MatchParents = original.qm?.MatchParents ?? true };
    193       this.updateEstimatedValuesOperator = new UpdateEstimatedValuesOperator();
     190      this.updateQualityOperator = new UpdateQualityOperator();
     191      Schema = original.Schema;
    194192    }
    195193
     
    295293      foreach (var ind in individualsToReplace) {
    296294        var mutatorOp = ExecutionContext.CreateChildOperation(mutator, ind);
    297         var updateOp = ExecutionContext.CreateChildOperation(updateEstimatedValuesOperator, ind);
     295        var updateOp = ExecutionContext.CreateChildOperation(updateQualityOperator, ind);
    298296        mutationOc.Add(mutatorOp);
    299297        updateEstimatedValues.Add(updateOp);
Note: See TracChangeset for help on using the changeset viewer.