|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.udo.cs.yale.operator.Operator
edu.udo.cs.yale.operator.OperatorChain
edu.udo.cs.yale.operator.learner.meta.AbstractMetaLearner
edu.udo.cs.yale.operator.learner.meta.AdaBoost
public class AdaBoost
This AdaBoost implementation can be used with all learners available in YALE, not only the ones which originally are part of the Weka package.
| Field Summary | |
|---|---|
protected int |
currentIteration
|
static double |
MIN_ADVANTAGE
Discard models with an advantage of less than the specified value. |
static java.lang.String |
NUM_OF_ITERATIONS
Name of the variable specifying the maximal number of iterations of the learner. |
private double[] |
oldWeights
|
private double |
performance
|
| Constructor Summary | |
|---|---|
AdaBoost(OperatorDescription description)
Constructor. |
|
| Method Summary | |
|---|---|
int |
getNumberOfSteps()
Returns the number of steps performed by this chain. |
java.util.List<ParameterType> |
getParameterTypes()
Adds the parameters "number of iterations" and "model file". |
private boolean |
isModelUseful(AdaBoostPerformanceMeasures wp)
Helper method to decide whether a model improves the training error enough to be considered. |
Model |
learn(ExampleSet exampleSet)
Constructs a Model repeatedly running a weak learner,
reweighting the training example set accordingly, and combining the
hypothesis using the available weighted performance values. |
protected double |
prepareWeights(ExampleSet exampleSet)
Creates a weight attribute if not yet done. |
boolean |
supportsCapability(LearnerCapability lc)
Overrides the method of the super class. |
private AdaBoostModel |
trainBoostingModel(ExampleSet trainingSet)
Main method for training the ensemble classifier |
| Methods inherited from class edu.udo.cs.yale.operator.learner.meta.AbstractMetaLearner |
|---|
apply, applyInnerLearner, checkLearnerCapabilities, getEstimatedPerformance, getInnerOperatorCondition, getInputClasses, getInputDescription, getMaxNumberOfInnerOperators, getMinNumberOfInnerOperators, getOutputClasses, getWeights, shouldCalculateWeights, shouldEstimatePerformance, shouldReturnInnerOutput |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface edu.udo.cs.yale.operator.learner.Learner |
|---|
getName |
| Field Detail |
|---|
public static final java.lang.String NUM_OF_ITERATIONS
public static final double MIN_ADVANTAGE
protected int currentIteration
private double performance
private double[] oldWeights
| Constructor Detail |
|---|
public AdaBoost(OperatorDescription description)
| Method Detail |
|---|
public boolean supportsCapability(LearnerCapability lc)
supportsCapability in interface LearnersupportsCapability in class AbstractMetaLearnerpublic int getNumberOfSteps()
OperatorChain
getNumberOfSteps in class AbstractMetaLearnerOperatorChain.getNumberOfSteps()
public Model learn(ExampleSet exampleSet)
throws OperatorException
Model repeatedly running a weak learner,
reweighting the training example set accordingly, and combining the
hypothesis using the available weighted performance values.
OperatorExceptionprotected double prepareWeights(ExampleSet exampleSet)
exampleSet - the example set to be prepared
private AdaBoostModel trainBoostingModel(ExampleSet trainingSet)
throws OperatorException
OperatorExceptionprivate boolean isModelUseful(AdaBoostPerformanceMeasures wp)
wp - the advantage over the default classifier / random guessing
true iff the advantage is high enough to consider
the model to be usefulpublic java.util.List<ParameterType> getParameterTypes()
getParameterTypes in class Operator
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||