InputType - The input type the algorithm is learning over.CategoryType - The category type the algorithm is learning over.public static class BaggingCategorizerLearner.OutOfBagErrorStoppingCriteria<InputType,CategoryType> extends AbstractCategorizerOutOfBagStoppingCriteria<InputType,CategoryType>
| Modifier and Type | Field and Description |
|---|---|
protected java.util.ArrayList<DataDistribution<CategoryType>> |
outOfBagEstimates
The running estimate of the ensemble for each example where an ensemble
member can only vote on elements that were not in the bag used to train
it.
|
DEFAULT_SMOOTHING_WINDOW_SIZE, learner, outOfBagCorrect, outOfBagErrorCount, previousSmoothedErrorRate, rawErrorRates, smoothedErrorRates, smoothingBuffer, smoothingWindowSize| Constructor and Description |
|---|
OutOfBagErrorStoppingCriteria()
Creates a new
OutOfBagErrorStoppingCriteria. |
OutOfBagErrorStoppingCriteria(int smoothingWindowSize)
Creates a new
OutOfBagErrorStoppingCriteria with the given
smoothing window size. |
| Modifier and Type | Method and Description |
|---|---|
void |
algorithmEnded(IterativeAlgorithm algorithm)
This method is called when the algorithm has ended, after the last step
of the algorithm.
|
void |
algorithmStarted(IterativeAlgorithm algorithm)
This method is called when a algorithm has started, before the first
step of the algorithm.
|
DataDistribution<CategoryType> |
getOutOfBagEstimate(int index)
Gets the out-of-bag estimate distribution across categories for the
training example with the given index.
|
void |
stepEnded(IterativeAlgorithm algorithm)
This method is called when the algorithm has ended a step of its
execution.
|
protected void |
updateOutOfBagEstimates()
Updates the out-of-bag estimates that this ensemble keeps.
|
getSmoothingWindowSize, setSmoothingWindowSizestepStartedcloneprotected transient java.util.ArrayList<DataDistribution<CategoryType>> outOfBagEstimates
public OutOfBagErrorStoppingCriteria()
OutOfBagErrorStoppingCriteria.public OutOfBagErrorStoppingCriteria(int smoothingWindowSize)
OutOfBagErrorStoppingCriteria with the given
smoothing window size.smoothingWindowSize - The smoothing window size to use. Must be positive.public void algorithmStarted(IterativeAlgorithm algorithm)
IterativeAlgorithmListeneralgorithmStarted in interface IterativeAlgorithmListeneralgorithmStarted in class AbstractCategorizerOutOfBagStoppingCriteria<InputType,CategoryType>algorithm - The algorithm that has started.public void algorithmEnded(IterativeAlgorithm algorithm)
IterativeAlgorithmListeneralgorithmEnded in interface IterativeAlgorithmListeneralgorithmEnded in class AbstractCategorizerOutOfBagStoppingCriteria<InputType,CategoryType>algorithm - The algorithm that has ended.public DataDistribution<CategoryType> getOutOfBagEstimate(int index)
AbstractCategorizerOutOfBagStoppingCriteriagetOutOfBagEstimate in class AbstractCategorizerOutOfBagStoppingCriteria<InputType,CategoryType>index - The 0-based index for the training example.protected void updateOutOfBagEstimates()
public void stepEnded(IterativeAlgorithm algorithm)
IterativeAlgorithmListenerstepEnded in interface IterativeAlgorithmListenerstepEnded in class AbstractCategorizerOutOfBagStoppingCriteria<InputType,CategoryType>algorithm - The algorithm that has ended another step of its execution.