Class AbstractErrorWeightedVote
- java.lang.Object
-
- moa.AbstractMOAObject
-
- moa.classifiers.rules.core.voting.AbstractErrorWeightedVote
-
- All Implemented Interfaces:
Serializable
,ErrorWeightedVote
,MOAObject
- Direct Known Subclasses:
ExpNegErrorWeightedVote
,InverseErrorWeightedVote
,MinErrorWeightedVote
,OneMinusErrorWeightedVote
,UniformWeightedVote
public abstract class AbstractErrorWeightedVote extends AbstractMOAObject implements ErrorWeightedVote
AbstractErrorWeightedVote class for weighted votes based on estimates of errors.- Version:
- $Revision: 1 $
- Author:
- João Duarte (jmduarte@inescporto.pt)
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AbstractErrorWeightedVote()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
addVote(double[] vote, double error)
Adds a vote and the corresponding error for the computation of the weighted vote and respective weighted error.abstract double[]
computeWeightedVote()
Computes the weighted vote.int
getNumberVotes()
The number of votes added so far.double
getWeightedError()
Returns the weighted error.double[]
getWeights()
Return the weights error.-
Methods inherited from class moa.AbstractMOAObject
copy, copy, measureByteSize, measureByteSize, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface moa.classifiers.rules.core.voting.ErrorWeightedVote
copy
-
Methods inherited from interface moa.MOAObject
getDescription
-
-
-
-
Method Detail
-
addVote
public void addVote(double[] vote, double error)
Description copied from interface:ErrorWeightedVote
Adds a vote and the corresponding error for the computation of the weighted vote and respective weighted error.- Specified by:
addVote
in interfaceErrorWeightedVote
- Parameters:
vote
- a vote returned by a classifiererror
- the error associated to the vote
-
computeWeightedVote
public abstract double[] computeWeightedVote()
Description copied from interface:ErrorWeightedVote
Computes the weighted vote. Also updates the weights of the votes.- Specified by:
computeWeightedVote
in interfaceErrorWeightedVote
- Returns:
- the weighted vote
-
getWeightedError
public double getWeightedError()
Description copied from interface:ErrorWeightedVote
Returns the weighted error.- Specified by:
getWeightedError
in interfaceErrorWeightedVote
- Returns:
- the weighted error
-
getWeights
public double[] getWeights()
Description copied from interface:ErrorWeightedVote
Return the weights error.- Specified by:
getWeights
in interfaceErrorWeightedVote
- Returns:
- the weights
-
getNumberVotes
public int getNumberVotes()
Description copied from interface:ErrorWeightedVote
The number of votes added so far.- Specified by:
getNumberVotes
in interfaceErrorWeightedVote
- Returns:
- the number of votes
-
-