Free cookie consent management tool by TermsFeed Policy Generator

Changeset 10273 for trunk/sources


Ignore:
Timestamp:
01/02/14 18:47:11 (11 years ago)
Author:
mkommend
Message:

#2132: Adapted the SymbolicClassificationSolutionImpactValuesCalculator to manipulate the cloned tree instead of using the cloner itself for the node exchange.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SymbolicClassificationSolutionImpactValuesCalculator.cs

    r9456 r10273  
    4949      var replacementValue = CalculateReplacementValue(classificationModel, node, classificationProblemData, rows);
    5050      var constantNode = new ConstantTreeNode(new Constant()) { Value = replacementValue };
     51
    5152      var cloner = new Cloner();
    52       cloner.RegisterClonedObject(node, constantNode);
    5353      var tempModel = cloner.Clone(classificationModel);
    54       tempModel.RecalculateModelParameters(classificationProblemData, rows);
     54      var tempModelNode = (ISymbolicExpressionTreeNode)cloner.GetClone(node);
     55
     56      var tempModelParentNode = tempModelNode.Parent;
     57      int i = tempModelParentNode.IndexOfSubtree(tempModelNode);
     58      tempModelParentNode.RemoveSubtree(i);
     59      tempModelParentNode.InsertSubtree(i, constantNode);
    5560
    5661      var estimatedClassValues = tempModel.GetEstimatedClassValues(dataset, rows);
Note: See TracChangeset for help on using the changeset viewer.