|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object weka.filters.Filter weka.filters.unsupervised.attribute.RemoveType
A filter that removes attributes of a given type.
Valid filter-specific options are:
-T type
Attribute type to delete.
Options are "nominal", "numeric", "string" and "date". (default "string")
-V
Invert matching sense (i.e. only keep specified columns)
Field Summary | |
protected Remove |
m_attributeFilter
The attribute filter used to do the filtering |
protected int |
m_attTypeToDelete
The type of attribute to delete |
protected boolean |
m_invert
Whether to invert selection |
static Tag[] |
TAGS_ATTRIBUTETYPE
Tag allowing selection of attribute type to delete |
Fields inherited from class weka.filters.Filter |
m_NewBatch |
Constructor Summary | |
RemoveType()
|
Method Summary | |
java.lang.String |
attributeTypeTipText()
Returns the tip text for this property |
boolean |
batchFinished()
Signify that this batch of input to the filter is finished. |
SelectedTag |
getAttributeType()
Gets the attribute type to be deleted by the filter. |
protected java.lang.String |
getAttributeTypeString()
Gets the attribute type to be deleted by the filter as a string. |
boolean |
getInvertSelection()
Get whether the supplied columns are to be removed or kept |
java.lang.String[] |
getOptions()
Gets the current settings of the filter. |
java.lang.String |
globalInfo()
Returns a string describing this filter |
boolean |
input(Instance instance)
Input an instance for filtering. |
java.lang.String |
invertSelectionTipText()
Returns the tip text for this property |
boolean |
isOutputFormatDefined()
Returns whether the output format is ready to be collected |
java.util.Enumeration |
listOptions()
Returns an enumeration describing the available options. |
static void |
main(java.lang.String[] argv)
Main method for testing this class. |
int |
numPendingOutput()
Returns the number of instances pending output |
Instance |
output()
Output an instance after filtering and remove from the output queue. |
Instance |
outputPeek()
Output an instance after filtering but do not remove from the output queue. |
void |
setAttributeType(SelectedTag type)
Sets the attribute type to be deleted by the filter. |
protected void |
setAttributeTypeString(java.lang.String typeString)
Sets the attribute type to be deleted by the filter. |
boolean |
setInputFormat(Instances instanceInfo)
Sets the format of the input instances. |
void |
setInvertSelection(boolean invert)
Set whether selected columns should be removed or kept. |
void |
setOptions(java.lang.String[] options)
Parses the options for this object. |
Methods inherited from class weka.filters.Filter |
batchFilterFile, bufferInput, copyStringValues, copyStringValues, filterFile, flushInput, getInputFormat, getInputStringIndex, getOutputFormat, getOutputStringIndex, getStringIndices, inputFormat, inputFormatPeek, outputFormat, outputFormatPeek, push, resetQueue, setOutputFormat, useFilter |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected Remove m_attributeFilter
protected int m_attTypeToDelete
protected boolean m_invert
public static final Tag[] TAGS_ATTRIBUTETYPE
Constructor Detail |
public RemoveType()
Method Detail |
public boolean setInputFormat(Instances instanceInfo) throws java.lang.Exception
setInputFormat
in class Filter
instanceInfo
- 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 inputFormat can't be set successfullypublic boolean input(Instance instance)
input
in class Filter
instance
- the input instance
public boolean batchFinished() throws java.lang.Exception
batchFinished
in class Filter
java.lang.Exception
- if there was a problem finishing the batch.public Instance output()
output
in class Filter
public Instance outputPeek()
outputPeek
in class Filter
public int numPendingOutput()
numPendingOutput
in class Filter
public boolean isOutputFormatDefined()
isOutputFormatDefined
in class Filter
public java.util.Enumeration listOptions()
listOptions
in interface OptionHandler
public void setOptions(java.lang.String[] options) throws java.lang.Exception
-T type
Attribute type to delete.
Options are "nominal", "numeric", "string" and "date". (default "string")
-V
Invert matching sense (i.e. only keep specified columns)
setOptions
in interface OptionHandler
options
- the list of options as an array of strings
java.lang.Exception
- if an option is not supportedpublic java.lang.String[] getOptions()
getOptions
in interface OptionHandler
public java.lang.String globalInfo()
public java.lang.String attributeTypeTipText()
public void setAttributeType(SelectedTag type)
type
- a TAGS_ATTRIBUTETYPE of the new type the filter should deletepublic SelectedTag getAttributeType()
public java.lang.String invertSelectionTipText()
public boolean getInvertSelection()
public void setInvertSelection(boolean invert)
invert
- the new invert settingprotected java.lang.String getAttributeTypeString()
protected void setAttributeTypeString(java.lang.String typeString)
public static void main(java.lang.String[] argv)
argv
- should contain arguments to the filter: use -h for help
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |