public class ErrorEstimatePruning extends PruningFunctionDTL
| Modifier and Type | Field and Description |
|---|---|
static double |
defaultConfidence |
| Constructor and Description |
|---|
ErrorEstimatePruning() |
| Modifier and Type | Method and Description |
|---|---|
static double |
errorRate(double f,
double N,
double z)
Calculates the pessimistic error rate e using the formula
(f + (z^2)/2N + z * sqrt(f/N - f^2/N + z^2/(4N^2)))/1 + z^2/N
|
static void |
main(String[] args) |
boolean |
pruneChild(DecisionTree node,
AMapping parent) |
DecisionTree |
pruneChildNodesIfNecessary(DecisionTree node)
Decides if all the child nodes or one of them have to be pruned
The nodes have to have the appropriate mappings in the classifiers
The child nodes of this node are leaves
|
public static double errorRate(double f,
double N,
double z)
f - observed error rate E/N, with N number of instances where E are errorsN - number of instancesz - confidence limitpublic static void main(String[] args)
public DecisionTree pruneChildNodesIfNecessary(DecisionTree node)
PruningFunctionDTLpruneChildNodesIfNecessary in class PruningFunctionDTLpublic boolean pruneChild(DecisionTree node, AMapping parent)
Copyright © 2020. All rights reserved.