Changeset 18146 for branches/3136_Structural_GP/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification
- Timestamp:
- 12/16/21 14:23:48 (2 years ago)
- Location:
- branches/3136_Structural_GP
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3136_Structural_GP
- Property svn:mergeinfo changed
-
branches/3136_Structural_GP/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification
- Property svn:mergeinfo changed
-
branches/3136_Structural_GP/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SymbolicClassificationPruningOperator.cs
r17180 r18146 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 INumericTreeNode) continue; 104 104 105 double impactValue, replacementValue, newQualityForImpactsCalculation;106 impactValuesCalculator.CalculateImpactAndReplacementValues(model, node, problemData, rows, out impactValue, out replacementValue, outnewQualityForImpactsCalculation, qualityForImpactsCalculation);105 impactValuesCalculator.CalculateImpactAndReplacementValues(model, node, problemData, rows, 106 out double impactValue, out double replacementValue, out double newQualityForImpactsCalculation, qualityForImpactsCalculation); 107 107 108 108 if (pruneOnlyZeroImpactNodes && !impactValue.IsAlmost(0.0)) continue; 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 ReplaceWith Constant(node, constantNode);114 ReplaceWithNumber(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.