weka.core.OptionHandlerpublic class SWFilter
extends weka.filters.Filter
implements weka.core.OptionHandler
| Modifier and Type | Field | Description |
|---|---|---|
static int |
NUM_LABELS |
| Constructor | Description |
|---|---|
SWFilter() |
| Modifier and Type | Method | Description |
|---|---|---|
int |
amplify(int i,
int[][] neighbours,
int numNeighbours,
int[] cleaningLabels) |
|
boolean |
batchFinished() |
Signify that this batch of input to the filter is finished.
|
int[] |
classify(int[][] neighbours,
int numNeighbours) |
|
java.lang.String |
classIndexTipText() |
Returns the tip text for this property
|
static java.lang.String |
cleaningLabelToShortString(int label) |
|
static java.lang.String |
cleaningLabelToString(int label) |
|
boolean |
getAmplifyInterestStrong() |
|
boolean |
getAmplifyInterestWeak() |
|
weka.core.Capabilities |
getCapabilities() |
|
int |
getClassIndex() |
|
int |
getInterestIndex() |
|
int |
getNumAmplified() |
|
int |
getNumNeighbours() |
|
int |
getNumRelabeled() |
|
java.lang.String[] |
getOptions() |
Gets the current settings of the filter.
|
boolean |
getRelabelOthers() |
|
java.lang.String |
getRevision() |
|
int |
getVersion() |
|
java.lang.String |
globalInfo() |
Returns a string describing this filter
|
boolean |
input(weka.core.Instance instance) |
Input an instance for filtering.
|
java.lang.String |
interestIndexTipText() |
Returns the tip text for this property
|
int |
labelCounts(int label) |
|
java.util.Enumeration |
listOptions() |
Returns an enumeration describing the available options.
|
static void |
main(java.lang.String[] argv) |
Main method for testing this class.
|
java.lang.String |
numNeighboursClassTipText() |
Returns the tip text for this property
|
void |
setAmplifyInterestStrong(boolean amplifyStrong) |
|
void |
setAmplifyInterestWeak(boolean amplifyWeak) |
|
void |
setClassIndex(int classIndex) |
|
boolean |
setInputFormat(weka.core.Instances instanceInfo) |
Sets the format of the input instances.
|
void |
setInterestIndex(int interestIndex) |
|
void |
setNumNeighbours(int numNeighbours) |
|
void |
setOptions(java.lang.String[] options) |
|
void |
setRelabelOthers(boolean relabelOthers) |
public static final int NUM_LABELS
public java.lang.String globalInfo()
public java.util.Enumeration listOptions()
listOptions in interface weka.core.OptionHandlerpublic void setOptions(java.lang.String[] options)
throws java.lang.Exception
setOptions in interface weka.core.OptionHandlerjava.lang.Exceptionpublic java.lang.String[] getOptions()
getOptions in interface weka.core.OptionHandlerpublic java.lang.String numNeighboursClassTipText()
public java.lang.String interestIndexTipText()
public java.lang.String classIndexTipText()
public boolean setInputFormat(weka.core.Instances instanceInfo)
throws java.lang.Exception
setInputFormat in class weka.filters.FilterinstanceInfo - an Instances object containing the input instance structure
(any instances contained in the object are ignored - only the
structure is required).java.lang.Exception - if the input format can't be set successfullypublic boolean input(weka.core.Instance instance)
input in class weka.filters.Filterinstance - the input instancejava.lang.IllegalStateException - if no input structure has been definedpublic boolean batchFinished()
batchFinished in class weka.filters.Filterjava.lang.IllegalStateException - if no input structure has been definedpublic int amplify(int i,
int[][] neighbours,
int numNeighbours,
int[] cleaningLabels)
public int labelCounts(int label)
public static java.lang.String cleaningLabelToString(int label)
public static java.lang.String cleaningLabelToShortString(int label)
public int[] classify(int[][] neighbours,
int numNeighbours)
public void setNumNeighbours(int numNeighbours)
throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentExceptionpublic void setClassIndex(int classIndex)
throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentExceptionpublic void setInterestIndex(int interestIndex)
throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentExceptionpublic void setRelabelOthers(boolean relabelOthers)
public void setAmplifyInterestStrong(boolean amplifyStrong)
public boolean getAmplifyInterestStrong()
public void setAmplifyInterestWeak(boolean amplifyWeak)
public boolean getAmplifyInterestWeak()
public boolean getRelabelOthers()
public int getClassIndex()
public int getInterestIndex()
public int getNumNeighbours()
public int getVersion()
public int getNumRelabeled()
public int getNumAmplified()
public weka.core.Capabilities getCapabilities()
getCapabilities in class weka.filters.Filterpublic static void main(java.lang.String[] argv)
argv - should contain arguments to the filter: use -h for helppublic java.lang.String getRevision()