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.TIntList
m_ClassColumns
the indices of the class columns to use in the filtering process.protected SpreadSheetColumnRange
m_ColRange
the columns to operate on (ifColumnSubset.RANGE
).protected BaseRegExp
m_ColRegExp
the column names to operate on (ifColumnSubset.REGEXP
).protected ColumnSubset
m_ColumnSubset
how to determine columns to use for filtering.protected gnu.trove.list.TIntList
m_DataColumns
the indices of the columns to use in the filtering process.protected boolean
m_DropOtherColumns
whether to drop the unprocessed columns (excl class columns).protected gnu.trove.list.TIntList
m_OtherColumns
the 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 String
colRangeTipText()
Returns the tip text for this property.String
colRegExpTipText()
Returns the tip text for this property.String
columnSubsetTipText()
Returns the tip text for this property.void
defineOptions()
Adds options to the internal list of options.String
dropOtherColumnsTipText()
Returns the tip text for this property.SpreadSheetColumnRange
getColRange()
Returns the range of columns to use for filtering (ifColumnSubset.RANGE
).BaseRegExp
getColRegExp()
Returns the regular expression to use on the column names to determine whether to use a column for filtering (ifColumnSubset.REGEXP
).ColumnSubset
getColumnSubset()
Returns how to determine columns for filtering.boolean
getDropOtherColumns()
Returns whether to drop other columns that aren't used for filtering from the output.protected void
initColumns(Dataset data)
Initializes the columns to use for the filter.protected void
reset()
Resets the scheme.void
setColRange(SpreadSheetColumnRange value)
Sets the range of columns to use for filtering (ifColumnSubset.RANGE
).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
).void
setColumnSubset(ColumnSubset value)
Sets how to determine columns for filtering.void
setDropOtherColumns(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:
defineOptions
in interfaceOptionHandler
- Overrides:
defineOptions
in classAbstractOptionHandler
-
reset
protected void reset()
Resets the scheme.- Overrides:
reset
in classAbstractFilter
-
setColumnSubset
public void setColumnSubset(ColumnSubset value)
Sets how to determine columns for filtering.- Specified by:
setColumnSubset
in interfaceColumnSubsetFilter
- Parameters:
value
- the type
-
getColumnSubset
public ColumnSubset getColumnSubset()
Returns how to determine columns for filtering.- Specified by:
getColumnSubset
in interfaceColumnSubsetFilter
- Returns:
- the type
-
columnSubsetTipText
public String columnSubsetTipText()
Returns the tip text for this property.- Specified by:
columnSubsetTipText
in 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:
setColRange
in interfaceColumnSubsetFilter
- Parameters:
value
- the range
-
getColRange
public SpreadSheetColumnRange getColRange()
Returns the range of columns to use for filtering (ifColumnSubset.RANGE
).- Specified by:
getColRange
in interfaceColumnSubsetFilter
- Returns:
- the range
-
colRangeTipText
public String colRangeTipText()
Returns the tip text for this property.- Specified by:
colRangeTipText
in 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:
setColRegExp
in 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:
getColRegExp
in interfaceColumnSubsetFilter
- Returns:
- the expression
-
colRegExpTipText
public String colRegExpTipText()
Returns the tip text for this property.- Specified by:
colRegExpTipText
in 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:
setDropOtherColumns
in 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:
getDropOtherColumns
in interfaceColumnSubsetFilter
- Returns:
- true if to drop
-
dropOtherColumnsTipText
public String dropOtherColumnsTipText()
Returns the tip text for this property.- Specified by:
dropOtherColumnsTipText
in interfaceColumnSubsetFilter
- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
-