public abstract class AbstractErrorWeightedVoteMultiLabel extends AbstractMOAObject implements ErrorWeightedVoteMultiLabel
Modifier and Type | Field and Description |
---|---|
protected List<double[]> |
errors |
protected int[] |
outputAttributesCount |
protected List<Prediction> |
votes |
protected Prediction |
weightedVote |
protected double[][] |
weights |
Constructor and Description |
---|
AbstractErrorWeightedVoteMultiLabel() |
Modifier and Type | Method and Description |
---|---|
void |
addVote(Prediction vote,
double[] error)
Adds a vote and the corresponding error for the computation of the weighted vote and respective weighted error.
|
abstract Prediction |
computeWeightedVote()
Computes the weighted vote.
|
boolean |
coversAllOutputs()
Check if vote has a value for each output
|
void |
getDescription(StringBuilder sb,
int indent)
Returns a string representation of this object.
|
int |
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.
|
copy, copy, measureByteSize, measureByteSize, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
copy
protected List<Prediction> votes
protected List<double[]> errors
protected double[][] weights
protected int[] outputAttributesCount
protected Prediction weightedVote
public void addVote(Prediction vote, double[] error)
ErrorWeightedVoteMultiLabel
addVote
in interface ErrorWeightedVoteMultiLabel
error
- - the error associated to the votepublic abstract Prediction computeWeightedVote()
ErrorWeightedVoteMultiLabel
computeWeightedVote
in interface ErrorWeightedVoteMultiLabel
public double getWeightedError()
ErrorWeightedVoteMultiLabel
getWeightedError
in interface ErrorWeightedVoteMultiLabel
public double[][] getWeights()
ErrorWeightedVoteMultiLabel
getWeights
in interface ErrorWeightedVoteMultiLabel
public int getNumberVotes()
ErrorWeightedVoteMultiLabel
getNumberVotes
in interface ErrorWeightedVoteMultiLabel
public int getNumberVotes(int outputAttribute)
ErrorWeightedVoteMultiLabel
getNumberVotes
in interface ErrorWeightedVoteMultiLabel
outputAttribute
- the index of the output attributepublic double[] getOutputAttributesErrors()
ErrorWeightedVoteMultiLabel
getOutputAttributesErrors
in interface ErrorWeightedVoteMultiLabel
public void getDescription(StringBuilder sb, int indent)
MOAObject
AbstractMOAObject.toString
to give a string representation of the object.getDescription
in interface MOAObject
sb
- the stringbuilder to add the descriptionindent
- the number of characters to indentpublic Prediction getPrediction()
getPrediction
in interface ErrorWeightedVoteMultiLabel
public boolean coversAllOutputs()
ErrorWeightedVoteMultiLabel
coversAllOutputs
in interface ErrorWeightedVoteMultiLabel
Copyright © 2019 University of Waikato, Hamilton, NZ. All Rights Reserved.