public class ReplaceMissingWithUserConstant extends PotentialClassIgnorer implements UnsupervisedFilter, StreamableFilter, EnvironmentHandler, WeightedInstancesHandler, WeightedAttributesHandler
| Constructor and Description | 
|---|
| ReplaceMissingWithUserConstant() | 
| Modifier and Type | Method and Description | 
|---|---|
| java.lang.String | attributesTipText()Tip text for this property suitable for displaying in the GUI. | 
| java.lang.String | dateFormatTipText()Tip text for this property suitable for displaying in the GUI. | 
| java.lang.String | dateReplacementValueTipText()Tip text for this property suitable for displaying in the GUI. | 
| java.lang.String | getAttributes()Get the list of attributes to consider for replacing missing values | 
| Capabilities | getCapabilities()Returns the Capabilities of this filter. | 
| java.lang.String | getDateFormat()Get the date format to use for parsing the date replacement constant | 
| java.lang.String | getDateReplacementValue()Get the date replacement value | 
| java.lang.String | getNominalStringReplacementValue()Get the nominal/string replacement value | 
| java.lang.String | getNumericReplacementValue()Get the numeric replacement value | 
| java.lang.String[] | getOptions()Gets the current settings of the filter. | 
| java.lang.String | getRevision()Returns the revision string. | 
| java.lang.String | globalInfo()Returns a string describing this filter | 
| boolean | input(Instance inst)Input an instance for filtering. | 
| java.util.Enumeration<Option> | listOptions()Returns an enumeration describing the available options. | 
| static void | main(java.lang.String[] args)Main method for testing this class. | 
| java.lang.String | nominalStringReplacementValueTipText()Tip text for this property suitable for displaying in the GUI. | 
| java.lang.String | numericReplacementValueTipText()Tip text for this property suitable for displaying in the GUI. | 
| void | setAttributes(java.lang.String range)Set the list of attributes to consider for replacing missing values | 
| void | setDateFormat(java.lang.String dateFormat)Set the date format to use for parsing the date replacement constant | 
| void | setDateReplacementValue(java.lang.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(java.lang.String nominalStringConstant)Set the nominal/string replacement value | 
| void | setNumericReplacementValue(java.lang.String numericConstant)Set the numeric replacement value | 
| void | setOptions(java.lang.String[] options)Parses a given list of options. | 
getIgnoreClass, getOutputFormat, ignoreClassTipText, setIgnoreClassbatchFilterFile, batchFinished, debugTipText, doNotCheckCapabilitiesTipText, filterFile, getCapabilities, getCopyOfInputFormat, getDebug, getDoNotCheckCapabilities, isFirstBatchDone, isNewBatch, isOutputFormatDefined, makeCopies, makeCopy, mayRemoveInstanceAfterFirstBatchDone, numPendingOutput, output, outputPeek, postExecution, preExecution, run, runFilter, setDebug, setDoNotCheckCapabilities, toString, useFilter, wekaStaticWrapperequals, getClass, hashCode, notify, notifyAll, wait, wait, waitmakeCopypublic java.lang.String globalInfo()
public Capabilities getCapabilities()
FiltergetCapabilities in interface CapabilitiesHandlergetCapabilities in class FilterCapabilitiespublic java.util.Enumeration<Option> listOptions()
PotentialClassIgnorerlistOptions in interface OptionHandlerlistOptions in class PotentialClassIgnorerpublic void setOptions(java.lang.String[] options)
                throws java.lang.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 stringsjava.lang.Exception - if an option is not supportedpublic java.lang.String[] getOptions()
PotentialClassIgnorergetOptions in interface OptionHandlergetOptions in class PotentialClassIgnorerpublic java.lang.String attributesTipText()
public void setAttributes(java.lang.String range)
range - the list of attributes to considerpublic java.lang.String getAttributes()
public java.lang.String nominalStringReplacementValueTipText()
public java.lang.String getNominalStringReplacementValue()
public void setNominalStringReplacementValue(java.lang.String nominalStringConstant)
nominalStringConstant - the nominal/string constant to usepublic java.lang.String numericReplacementValueTipText()
public java.lang.String getNumericReplacementValue()
public void setNumericReplacementValue(java.lang.String numericConstant)
numericConstant - the numeric replacement valuepublic java.lang.String dateReplacementValueTipText()
public void setDateReplacementValue(java.lang.String dateConstant)
dateConstant - the date replacement valuepublic java.lang.String getDateReplacementValue()
public java.lang.String dateFormatTipText()
public void setDateFormat(java.lang.String dateFormat)
dateFormat - the date format to usepublic java.lang.String getDateFormat()
public boolean setInputFormat(Instances instanceInfo) throws java.lang.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).java.lang.Exception - if the inputFormat can't be set successfullypublic boolean input(Instance inst) throws java.lang.Exception
Filterinput in class Filterinst - the input instancejava.lang.NullPointerException - if the input format has not been defined.java.lang.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 java.lang.String getRevision()
getRevision in interface RevisionHandlergetRevision in class Filterpublic static void main(java.lang.String[] args)
args - should contain arguments to the filter: use -h for help