Interface ErrorWeightedVoteMultiLabel
-
- All Known Implementing Classes:
AbstractErrorWeightedVoteMultiLabel
,FirstHitVoteMultiLabel
,InverseErrorWeightedVoteMultiLabel
,UniformWeightedVoteMultiLabel
public interface ErrorWeightedVoteMultiLabel
ErrorWeightedVoteMultiLabel interface for weighted votes based on estimates of errors.- Version:
- $Revision: 1 $
- Author:
- João Duarte (joaomaiaduarte@gmail.com)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addVote(Prediction prediction, double[] error)
Adds a vote and the corresponding error for the computation of the weighted vote and respective weighted error.Prediction
computeWeightedVote()
Computes the weighted vote.MOAObject
copy()
Creates a copy of the objectboolean
coversAllOutputs()
Check if vote has a value for each outputint
getNumberVotes()
The number of votes added so far.int
getNumberVotes(int outputAttribute)
The number of votes for a given output attribute.double[]
getOutputAttributesErrors()
Returns the weighted error.Prediction
getPrediction()
double
getWeightedError()
Returns the weighted error.double[][]
getWeights()
Return the weights error.
-
-
-
Method Detail
-
addVote
void addVote(Prediction prediction, double[] error)
Adds a vote and the corresponding error for the computation of the weighted vote and respective weighted error.- Parameters:
prediction
- - a vote returned by a classifiererror
- - the error associated to the vote
-
computeWeightedVote
Prediction computeWeightedVote()
Computes the weighted vote. Also updates the weights of the votes.- Returns:
- the weighted vote
-
getWeightedError
double getWeightedError()
Returns the weighted error.- Returns:
- the weighted error
-
getOutputAttributesErrors
double[] getOutputAttributesErrors()
Returns the weighted error.- Returns:
- the weighted error for each output attribute
-
getWeights
double[][] getWeights()
Return the weights error.- Returns:
- the weights for each output attribute
-
getNumberVotes
int getNumberVotes()
The number of votes added so far.- Returns:
- the number of votes
-
getNumberVotes
int getNumberVotes(int outputAttribute)
The number of votes for a given output attribute.- Parameters:
outputAttribute
- the index of the output attribute- Returns:
- the number of votes
-
coversAllOutputs
boolean coversAllOutputs()
Check if vote has a value for each output
-
copy
MOAObject copy()
Creates a copy of the object- Returns:
- copy of the object
-
getPrediction
Prediction getPrediction()
-
-