classification
Class MajorityVoteClassifier

java.lang.Object
  extended by classification.MajorityVoteClassifier
All Implemented Interfaces:
MetaClassifier

public class MajorityVoteClassifier
extends java.lang.Object
implements MetaClassifier

Creates an ensemble by holding a majority vote among the included prediction sets.


Constructor Summary
MajorityVoteClassifier(double accuracyCutoff, double similarityCutoff)
          Creates a new classifier that generates an ensemble through a majority vote of the predictions it is given.
 
Method Summary
 Ensemble generateEnsemble(java.util.List<PredictionSet> predSetList, DataSet data)
          Generates an ensemble for the given data using the provided predictions.
 double getAccuracyCutoff()
          Retrieves the percentage accuracy below which a classifier will not accept predictions.
 java.lang.String getAttribute()
          Retrieves the name of the attribute that the classifier considers.
 java.lang.String getName()
          Retrieves the name of a classifier.
 double getSimilarityCutoff()
          Retrieves the percentage similarity above which a classifier will not accept predictions.
 java.lang.Boolean isChanged()
          Determines if anything about the classifier has been changed since the method was last called.
 void setAccuracyCutoff(double accuracyCutoff)
          Sets the percentage accuracy below which a classifier will not accept predictions.
 void setAttribute(java.lang.String attribute)
          Sets the attribute that the classifier will consider.
 void setSimilarityCutoff(double similarityCutoff)
          Sets the percentage similarity above which a classifier will not accept predictions.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MajorityVoteClassifier

public MajorityVoteClassifier(double accuracyCutoff,
                              double similarityCutoff)
Creates a new classifier that generates an ensemble through a majority vote of the predictions it is given.

Parameters:
accuracyCutoff - The minimum percentage accuracy a set of predictions must have to be included in the voting
similarityCutoff - The percentage similarity above which a prediction set will either replace another, less accurate included set or not be included
Method Detail

getName

public java.lang.String getName()
Description copied from interface: MetaClassifier
Retrieves the name of a classifier.

Specified by:
getName in interface MetaClassifier
Returns:
The classifier's name

generateEnsemble

public Ensemble generateEnsemble(java.util.List<PredictionSet> predSetList,
                                 DataSet data)
Description copied from interface: MetaClassifier
Generates an ensemble for the given data using the provided predictions.

Specified by:
generateEnsemble in interface MetaClassifier
Parameters:
predSetList - A list of prediction sets to consider in making the ensemble
data - The data set to judge the predictions against
Returns:
The generated ensemble, or null if none could be generated

getAccuracyCutoff

public double getAccuracyCutoff()
Description copied from interface: MetaClassifier
Retrieves the percentage accuracy below which a classifier will not accept predictions.

Specified by:
getAccuracyCutoff in interface MetaClassifier
Returns:
The accuracy cutoff, in the interval [0,100]

setAccuracyCutoff

public void setAccuracyCutoff(double accuracyCutoff)
Description copied from interface: MetaClassifier
Sets the percentage accuracy below which a classifier will not accept predictions.

Specified by:
setAccuracyCutoff in interface MetaClassifier
Parameters:
accuracyCutoff - The desired cutoff, in the interval [0,100]

getSimilarityCutoff

public double getSimilarityCutoff()
Description copied from interface: MetaClassifier
Retrieves the percentage similarity above which a classifier will not accept predictions.

Specified by:
getSimilarityCutoff in interface MetaClassifier
Returns:
The similarity cutoff, in the interval [0,100]

setSimilarityCutoff

public void setSimilarityCutoff(double similarityCutoff)
Description copied from interface: MetaClassifier
Sets the percentage similarity above which a classifier will not accept predictions.

Specified by:
setSimilarityCutoff in interface MetaClassifier
Parameters:
similarityCutoff - The desired cutoff, in the interval [0,100]

getAttribute

public java.lang.String getAttribute()
Description copied from interface: MetaClassifier
Retrieves the name of the attribute that the classifier considers.

Specified by:
getAttribute in interface MetaClassifier
Returns:
The name of an attribute for some data set

setAttribute

public void setAttribute(java.lang.String attribute)
Description copied from interface: MetaClassifier
Sets the attribute that the classifier will consider.

Specified by:
setAttribute in interface MetaClassifier
Parameters:
attribute - The name of an attribute for some data set

isChanged

public java.lang.Boolean isChanged()
Description copied from interface: MetaClassifier
Determines if anything about the classifier has been changed since the method was last called.

Specified by:
isChanged in interface MetaClassifier
Returns:
True if the classifier has changed, else false