object
c45_classifier
C4.5 decision tree learning algorithm. Builds a decision tree from a dataset object implementing the dataset_protocol protocol and provides predicates for exporting the learned tree as a list of predicate clauses or to a file. Supports both discrete and continuous attributes, handles missing values, and supports tree pruning.
logtalk_load(c45_classifier(loader))static, context_switching_callsPublic predicates
prune/5
Prunes a decision tree using pessimistic error pruning (PEP). This post-pruning method estimates error rates using the upper confidence bound of the binomial distribution with the given confidence factor and replaces subtrees with leaf nodes when doing so would not increase the estimated error. Pruning helps reduce overfitting and can improve generalization to unseen data.
staticprune(Dataset,Tree,ConfidenceFactor,MinInstances,PrunedTree)prune(+object_identifier,+tree,+float,+positive_integer,-tree) - one
Confidence factor: The confidence factor controls the aggressiveness of pruning. It must be in the range
(0.0, 1.0). Lower values result in more aggressive pruning (smaller, simpler trees), while higher values result in less pruning (larger, more complex trees). The default value is0.25.Minimum instances per leaf: The minimum number of instances required at a leaf node. When a node has fewer instances than this value, the node may be pruned. It must be a positive integer. The default value is
2.Statistical basis: The pruning uses the upper confidence bound of the binomial distribution to estimate the true error rate.
prune/3
Prunes a decision tree using pessimistic error pruning (PEP) with default parameter values. Calls prune/5 with ConfidenceFactor = 0.25 and MinInstances = 2.
staticprune(Dataset,Tree,PrunedTree)prune(+object_identifier,+tree,-tree) - one
Default parameters: Uses the standard C4.5 default values: confidence factor of
0.25(the confidence level for computing the upper bound of the error estimate) and minimum instances per leaf of2.
Protected predicates
(no local declarations; see entity ancestors if any)
Private predicates
(no local declarations; see entity ancestors if any)
Operators
(none)