public class ReplaceMissingWithUserConstant extends PotentialClassIgnorer implements UnsupervisedFilter, StreamableFilter, EnvironmentHandler
| Constructor and Description |
|---|
ReplaceMissingWithUserConstant() |
| Modifier and Type | Method and Description |
|---|---|
String |
attributesTipText()
Tip text for this property suitable for displaying in the GUI.
|
String |
dateFormatTipText()
Tip text for this property suitable for displaying in the GUI.
|
String |
dateReplacementValueTipText()
Tip text for this property suitable for displaying in the GUI.
|
String |
getAttributes()
Get the list of attributes to consider for replacing missing values
|
Capabilities |
getCapabilities()
Returns the Capabilities of this filter.
|
String |
getDateFormat()
Get the date format to use for parsing the date replacement constant
|
String |
getDateReplacementValue()
Get the date replacement value
|
String |
getNominalStringReplacementValue()
Get the nominal/string replacement value
|
String |
getNumericReplacementValue()
Get the numeric replacement value
|
String[] |
getOptions()
Gets the current settings of the filter.
|
String |
getRevision()
Returns the revision string.
|
String |
globalInfo()
Returns a string describing this filter
|
boolean |
input(Instance inst)
Input an instance for filtering.
|
Enumeration |
listOptions()
Returns an enumeration describing the available options.
|
static void |
main(String[] args)
Main method for testing this class.
|
String |
nominalStringReplacementValueTipText()
Tip text for this property suitable for displaying in the GUI.
|
String |
numericReplacementValueTipText()
Tip text for this property suitable for displaying in the GUI.
|
void |
setAttributes(String range)
Set the list of attributes to consider for replacing missing values
|
void |
setDateFormat(String dateFormat)
Set the date format to use for parsing the date replacement constant
|
void |
setDateReplacementValue(String dateConstant)
Set the date replacement value
|
void |
setEnvironment(Environment env)
Set environment variables to use.
|
boolean |
setInputFormat(Instances instanceInfo)
Sets the format of the input instances.
|
void |
setNominalStringReplacementValue(String nominalStringConstant)
Set the nominal/string replacement value
|
void |
setNumericReplacementValue(String numericConstant)
Set the numeric replacement value
|
void |
setOptions(String[] options)
Parses a given list of options.
|
getIgnoreClass, getOutputFormat, ignoreClassTipText, setIgnoreClassbatchFilterFile, batchFinished, filterFile, getCapabilities, isFirstBatchDone, isNewBatch, isOutputFormatDefined, makeCopies, makeCopy, mayRemoveInstanceAfterFirstBatchDone, numPendingOutput, output, outputPeek, runFilter, toString, useFilter, wekaStaticWrapperpublic String globalInfo()
public Capabilities getCapabilities()
FiltergetCapabilities in interface CapabilitiesHandlergetCapabilities in class FilterCapabilitiespublic Enumeration listOptions()
PotentialClassIgnorerlistOptions in interface OptionHandlerlistOptions in class PotentialClassIgnorerpublic void setOptions(String[] options) throws Exception
-A <index1,index2-index4,... | att-name1,att-name2,...> Specify list of attributes to replace missing values for (as weka range list of indices or a comma separated list of attribute names). (default: consider all attributes)
-N Specify the replacement constant for nominal/string attributes
-R Specify the replacement constant for numeric attributes (default: 0)
-D Specify the replacement constant for date attributes
-F Specify the date format for parsing the replacement date constant (default: yyyy-MM-dd'T'HH:mm:ss)
-unset-class-temporarily Unsets the class index temporarily before the filter is applied to the data. (default: no)
setOptions in interface OptionHandlersetOptions in class PotentialClassIgnoreroptions - the list of options as an array of stringsException - if an option is not supportedpublic String[] getOptions()
PotentialClassIgnorergetOptions in interface OptionHandlergetOptions in class PotentialClassIgnorerpublic String attributesTipText()
public void setAttributes(String range)
range - the list of attributes to considerpublic String getAttributes()
public String nominalStringReplacementValueTipText()
public String getNominalStringReplacementValue()
public void setNominalStringReplacementValue(String nominalStringConstant)
m_nominalStringConstant - the nominal/string constant to usepublic String numericReplacementValueTipText()
public String getNumericReplacementValue()
public void setNumericReplacementValue(String numericConstant)
numericConstant - the numeric replacement valuepublic String dateReplacementValueTipText()
public void setDateReplacementValue(String dateConstant)
dateConstant - the date replacement valuepublic String getDateReplacementValue()
public String dateFormatTipText()
public void setDateFormat(String dateFormat)
dateFormat - the date format to usepublic String getDateFormat()
public boolean setInputFormat(Instances instanceInfo) throws Exception
PotentialClassIgnorersuper.setInputFormat(Instances)setInputFormat in class PotentialClassIgnorerinstanceInfo - an Instances object containing the input instance
structure (any instances contained in the object are ignored - only the
structure is required).Exception - if the inputFormat can't be set successfullypublic boolean input(Instance inst) throws Exception
Filterinput in class Filterinst - the input instanceNullPointerException - if the input format has not been
defined.Exception - if the input instance was not of the correct
format or if there was a problem with the filtering.public void setEnvironment(Environment env)
EnvironmentHandlersetEnvironment in interface EnvironmentHandlerenv - the environment variables to
usepublic String getRevision()
getRevision in interface RevisionHandlergetRevision in class Filterpublic static void main(String[] args)
args - should contain arguments to the filter: use -h for helpCopyright © 2013 University of Waikato, Hamilton, NZ. All Rights Reserved.