Package adams.ml.preprocessing
Class AbstractColumnSubsetFilter
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.ml.preprocessing.AbstractFilter
-
- adams.ml.preprocessing.AbstractColumnSubsetFilter
-
- All Implemented Interfaces:
Destroyable,GlobalInfoSupporter,LoggingLevelHandler,LoggingSupporter,OptionHandler,SizeOfHandler,CapabilitiesHandler,ColumnSubsetFilter,Filter,Serializable
- Direct Known Subclasses:
AbstractColumnSubsetBatchFilter,AbstractColumnSubsetStreamFilter
public abstract class AbstractColumnSubsetFilter extends AbstractFilter implements ColumnSubsetFilter
Ancestor for filters.- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected gnu.trove.list.TIntListm_ClassColumnsthe indices of the class columns to use in the filtering process.protected SpreadSheetColumnRangem_ColRangethe columns to operate on (ifColumnSubset.RANGE).protected BaseRegExpm_ColRegExpthe column names to operate on (ifColumnSubset.REGEXP).protected ColumnSubsetm_ColumnSubsethow to determine columns to use for filtering.protected gnu.trove.list.TIntListm_DataColumnsthe indices of the columns to use in the filtering process.protected booleanm_DropOtherColumnswhether to drop the unprocessed columns (excl class columns).protected gnu.trove.list.TIntListm_OtherColumnsthe indices of the other columns not to be used in the filtering process.-
Fields inherited from class adams.ml.preprocessing.AbstractFilter
m_Initialized, m_OutputFormat
-
Fields inherited from class adams.core.option.AbstractOptionHandler
m_OptionManager
-
Fields inherited from class adams.core.logging.LoggingObject
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
-
Constructor Summary
Constructors Constructor Description AbstractColumnSubsetFilter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringcolRangeTipText()Returns the tip text for this property.StringcolRegExpTipText()Returns the tip text for this property.StringcolumnSubsetTipText()Returns the tip text for this property.voiddefineOptions()Adds options to the internal list of options.StringdropOtherColumnsTipText()Returns the tip text for this property.SpreadSheetColumnRangegetColRange()Returns the range of columns to use for filtering (ifColumnSubset.RANGE).BaseRegExpgetColRegExp()Returns the regular expression to use on the column names to determine whether to use a column for filtering (ifColumnSubset.REGEXP).ColumnSubsetgetColumnSubset()Returns how to determine columns for filtering.booleangetDropOtherColumns()Returns whether to drop other columns that aren't used for filtering from the output.protected voidinitColumns(Dataset data)Initializes the columns to use for the filter.protected voidreset()Resets the scheme.voidsetColRange(SpreadSheetColumnRange value)Sets the range of columns to use for filtering (ifColumnSubset.RANGE).voidsetColRegExp(BaseRegExp value)Sets the regular expression to use on the column names to determine whether * to use a column for filtering (ifColumnSubset.REGEXP).voidsetColumnSubset(ColumnSubset value)Sets how to determine columns for filtering.voidsetDropOtherColumns(boolean value)Sets whether to drop other columns that aren't used for filtering from the output.-
Methods inherited from class adams.ml.preprocessing.AbstractFilter
appendData, appendHeader, getOutputFormat, isInitialized
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, globalInfo, initialize, loggingLevelTipText, newOptionManager, setLoggingLevel, toCommandLine, toString
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface adams.ml.preprocessing.ColumnSubsetFilter
getOutputFormat, isInitialized
-
Methods inherited from interface adams.ml.preprocessing.Filter
getCapabilities
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
-
-
-
Field Detail
-
m_ColumnSubset
protected ColumnSubset m_ColumnSubset
how to determine columns to use for filtering.
-
m_ColRange
protected SpreadSheetColumnRange m_ColRange
the columns to operate on (ifColumnSubset.RANGE).
-
m_ColRegExp
protected BaseRegExp m_ColRegExp
the column names to operate on (ifColumnSubset.REGEXP).
-
m_DropOtherColumns
protected boolean m_DropOtherColumns
whether to drop the unprocessed columns (excl class columns).
-
m_DataColumns
protected gnu.trove.list.TIntList m_DataColumns
the indices of the columns to use in the filtering process.
-
m_ClassColumns
protected gnu.trove.list.TIntList m_ClassColumns
the indices of the class columns to use in the filtering process.
-
m_OtherColumns
protected gnu.trove.list.TIntList m_OtherColumns
the indices of the other columns not to be used in the filtering process.
-
-
Method Detail
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptionsin interfaceOptionHandler- Overrides:
defineOptionsin classAbstractOptionHandler
-
reset
protected void reset()
Resets the scheme.- Overrides:
resetin classAbstractFilter
-
setColumnSubset
public void setColumnSubset(ColumnSubset value)
Sets how to determine columns for filtering.- Specified by:
setColumnSubsetin interfaceColumnSubsetFilter- Parameters:
value- the type
-
getColumnSubset
public ColumnSubset getColumnSubset()
Returns how to determine columns for filtering.- Specified by:
getColumnSubsetin interfaceColumnSubsetFilter- Returns:
- the type
-
columnSubsetTipText
public String columnSubsetTipText()
Returns the tip text for this property.- Specified by:
columnSubsetTipTextin interfaceColumnSubsetFilter- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setColRange
public void setColRange(SpreadSheetColumnRange value)
Sets the range of columns to use for filtering (ifColumnSubset.RANGE).- Specified by:
setColRangein interfaceColumnSubsetFilter- Parameters:
value- the range
-
getColRange
public SpreadSheetColumnRange getColRange()
Returns the range of columns to use for filtering (ifColumnSubset.RANGE).- Specified by:
getColRangein interfaceColumnSubsetFilter- Returns:
- the range
-
colRangeTipText
public String colRangeTipText()
Returns the tip text for this property.- Specified by:
colRangeTipTextin interfaceColumnSubsetFilter- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setColRegExp
public void setColRegExp(BaseRegExp value)
Sets the regular expression to use on the column names to determine whether * to use a column for filtering (ifColumnSubset.REGEXP).- Specified by:
setColRegExpin interfaceColumnSubsetFilter- Parameters:
value- the expression
-
getColRegExp
public BaseRegExp getColRegExp()
Returns the regular expression to use on the column names to determine whether to use a column for filtering (ifColumnSubset.REGEXP).- Specified by:
getColRegExpin interfaceColumnSubsetFilter- Returns:
- the expression
-
colRegExpTipText
public String colRegExpTipText()
Returns the tip text for this property.- Specified by:
colRegExpTipTextin interfaceColumnSubsetFilter- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setDropOtherColumns
public void setDropOtherColumns(boolean value)
Sets whether to drop other columns that aren't used for filtering from the output. Does not affect any class columns.- Specified by:
setDropOtherColumnsin interfaceColumnSubsetFilter- Parameters:
value- true if to drop
-
getDropOtherColumns
public boolean getDropOtherColumns()
Returns whether to drop other columns that aren't used for filtering from the output. Does not affect any class columns.- Specified by:
getDropOtherColumnsin interfaceColumnSubsetFilter- Returns:
- true if to drop
-
dropOtherColumnsTipText
public String dropOtherColumnsTipText()
Returns the tip text for this property.- Specified by:
dropOtherColumnsTipTextin interfaceColumnSubsetFilter- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
-