gov.sandia.cognition.learning.algorithm.tree
Interface PriorWeightedNodeLearner<OutputType>

Type Parameters:
OutputType - The (output) type for the decision tree. E.g., Integer.
All Known Implementing Classes:
VectorThresholdInformationGainLearner

public interface PriorWeightedNodeLearner<OutputType>

The PriorWeightedNodeLearner interface specifies the ability to configure prior weights on the learning algorithm that searches for a decision function inside a decision tree. The CategorizationTreeLearner checks if the split criterion supports this interface, and if it does, configures the split criterion with prior weights and counts. Classes implementing DeciderLearner or VectorThresholdMaximumGainLearner should consider whether it makes sense to also implement this class.

Since:
3.4
Author:
Art Munson

Method Summary
 void configure(Map<OutputType,Double> priors, Map<OutputType,Integer> trainCounts)
          Configure the node learner with prior weights and training counts.
 

Method Detail

configure

void configure(Map<OutputType,Double> priors,
               Map<OutputType,Integer> trainCounts)
Configure the node learner with prior weights and training counts.

If the prior weights are not specified, this method will configure default priors that match the relative frequencies of the different categories in the training data. The frequencies are based on the given category counts from the training data.

Parameters:
priors - Prior weights for each of the possible output values (i.e., the categories for the prediction task). If null, the method will estimate default priors from the training counts.
trainCounts - Frequency counts of the possible output values (i.e., categories) in the training data. This parameter should always be specified.