Changeset 18100 for branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification
- Timestamp:
- 12/01/21 13:40:55 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SymbolicClassificationPruningOperator.cs
r17180 r18100 101 101 for (int i = 0; i < nodes.Count; ++i) { 102 102 var node = nodes[i]; 103 if (node is ConstantTreeNode) continue;103 if (node is NumberTreeNode) continue; 104 104 105 105 double impactValue, replacementValue, newQualityForImpactsCalculation; … … 109 109 if (!pruneOnlyZeroImpactNodes && impactValue > nodeImpactThreshold) continue; 110 110 111 var constantNode = (ConstantTreeNode)node.Grammar.GetSymbol("Constant").CreateTreeNode();112 constantNode.Value = replacementValue;111 var numberNode = (NumberTreeNode)node.Grammar.GetSymbol("Number").CreateTreeNode(); 112 numberNode.Value = replacementValue; 113 113 114 ReplaceWithConstant(node, constantNode);114 ReplaceWithConstant(node, numberNode); 115 115 i += node.GetLength() - 1; // skip subtrees under the node that was folded 116 116
Note: See TracChangeset
for help on using the changeset viewer.