public interface Learner<E extends Example> extends MOAObject, OptionHandler, AWTRenderable
Modifier and Type | Method and Description |
---|---|
MOAObject |
getModel()
Gets the model if this learner.
|
InstancesHeader |
getModelContext()
Gets the reference to the header of the data stream.
|
Measurement[] |
getModelMeasurements()
Gets the current measurements of this learner.
|
Prediction |
getPredictionForInstance(E testInst) |
Learner[] |
getSublearners()
Gets the learners of this ensemble.
|
double[] |
getVotesForInstance(E example)
Predicts the class memberships for a given instance.
|
boolean |
isRandomizable()
Gets whether this learner needs a random seed.
|
void |
resetLearning()
Resets this learner.
|
void |
setModelContext(InstancesHeader ih)
Sets the reference to the header of the data stream.
|
void |
setRandomSeed(int s)
Sets the seed for random number generation.
|
boolean |
trainingHasStarted()
Gets whether training has started.
|
double |
trainingWeightSeenByModel()
Gets the sum of the weights of the instances that have been used
by this learner during the training in
trainOnInstance |
void |
trainOnInstance(E example)
Trains this learner incrementally using the given example.
|
copy, getCLICreationString, getOptions, getPurposeString, prepareForUse, prepareForUse
getDescription, measureByteSize
getAWTRenderer
boolean isRandomizable()
void setRandomSeed(int s)
s
- the seedboolean trainingHasStarted()
double trainingWeightSeenByModel()
trainOnInstance
void resetLearning()
void trainOnInstance(E example)
inst
- the instance to be used for trainingdouble[] getVotesForInstance(E example)
inst
- the instance to be classifiedMeasurement[] getModelMeasurements()
Learner[] getSublearners()
MOAObject getModel()
void setModelContext(InstancesHeader ih)
Instances
.
This header is needed to know the number of classes and attributesih
- the reference to the data stream headerInstancesHeader getModelContext()
Instances
.
This header is needed to know the number of classes and attributesPrediction getPredictionForInstance(E testInst)
Copyright © 2019 University of Waikato, Hamilton, NZ. All Rights Reserved.