public class MajorityClass extends AbstractClassifier
classifierRandom
Constructor and Description |
---|
MajorityClass() |
Modifier and Type | Method and Description |
---|---|
void |
getModelDescription(StringBuilder out,
int indent)
Returns a string representation of the model.
|
String |
getPurposeString()
Dictionary with option texts and objects
|
double[] |
getVotesForInstance(Instance i)
Predicts the class memberships for a given instance.
|
boolean |
isRandomizable()
Gets whether this learner needs a random seed.
|
void |
resetLearningImpl()
Resets this classifier.
|
void |
trainOnInstanceImpl(Instance inst)
Trains this classifier incrementally using the given instance.
The reason for ...Impl methods: ease programmer burden by not requiring them to remember calls to super in overridden methods. |
contextIsCompatible, copy, correctlyClassifies, getAttributeNameString, getClassLabelString, getClassNameString, getDescription, getModel, getModelContext, getModelMeasurements, getNominalValueString, getSubClassifiers, getSublearners, getVotesForInstance, prepareForUseImpl, resetLearning, setModelContext, setRandomSeed, trainingHasStarted, trainingWeightSeenByModel, trainOnInstance, trainOnInstance
getCLICreationString, getOptions, prepareForUse, prepareForUse
copy, measureByteSize, measureByteSize, toString
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
getCLICreationString, getOptions, prepareForUse, prepareForUse
measureByteSize
public String getPurposeString()
AbstractOptionHandler
getPurposeString
in interface OptionHandler
getPurposeString
in class AbstractClassifier
public void resetLearningImpl()
AbstractClassifier
resetLearningImpl
in class AbstractClassifier
public void trainOnInstanceImpl(Instance inst)
AbstractClassifier
trainOnInstanceImpl
in class AbstractClassifier
inst
- the instance to be used for trainingpublic double[] getVotesForInstance(Instance i)
Classifier
getVotesForInstance
in interface Classifier
getVotesForInstance
in class AbstractClassifier
i
- the instance to be classifiedpublic void getModelDescription(StringBuilder out, int indent)
AbstractClassifier
getModelDescription
in class AbstractClassifier
out
- the stringbuilder to add the descriptionindent
- the number of characters to indentpublic boolean isRandomizable()
Learner
Copyright © 2013–2015 The Apache Software Foundation. All rights reserved.