Package adams.data.weka.rowfinder
Class FilteredIQR
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.data.weka.rowfinder.AbstractRowFinder
-
- adams.data.weka.rowfinder.AbstractTrainableRowFinder
-
- adams.data.weka.rowfinder.FilteredIQR
-
- All Implemented Interfaces:
adams.core.Destroyable
,adams.core.GlobalInfoSupporter
,adams.core.logging.LoggingLevelHandler
,adams.core.logging.LoggingSupporter
,adams.core.option.OptionHandler
,adams.core.ShallowCopySupporter<RowFinder>
,adams.core.SizeOfHandler
,RowFinder
,TrainableRowFinder
,Serializable
public class FilteredIQR extends AbstractTrainableRowFinder
Returns indices of rows that got identified as outliers/extreme values.
Valid options are:
-D <int> (property: debugLevel) The greater the number the more additional info the scheme may output to the console (0 = off). default: 0 minimum: 0
-pre-filter <weka.filters.Filter> (property: preFilter) The filter to pre-filter the data with before subjecting it to the IQR filter. default: weka.filters.AllFilter
-filter <weka.filters.Filter> (property: filter) The IQR filter to use; parameters get set internally. default: weka.filters.unsupervised.attribute.InterquartileRange -R first-last -O 3.0 -E 6.0
-iqr <double> (property: iqr) IQR multipler for min/max values. default: 4.25 minimum: 0.0
-attribute-range <adams.core.Range> (property: attributeRange) The attribute range to work on. default: first-last
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected weka.filters.unsupervised.attribute.InterquartileRange
m_ActualFilter
the actual IQR filter.protected weka.filters.unsupervised.attribute.InterquartileRange
m_Filter
the IQR filter.protected weka.filters.MultiFilter
m_FullFilter
theMultiFilter
doing all the filtering.protected double
m_IQR
the maximum value of the attribute.protected weka.filters.Filter
m_PreFilter
the filter to apply to the data first.protected adams.core.Range
m_Range
the attribute range to work on.-
Fields inherited from class adams.data.weka.rowfinder.AbstractTrainableRowFinder
m_Trained
-
-
Constructor Summary
Constructors Constructor Description FilteredIQR()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
attributeRangeTipText()
Returns the tip text for this property.void
defineOptions()
Adds options to the internal list of options.protected int[]
doFindRows(weka.core.Instances data)
Returns the rows of interest in the dataset.protected boolean
doTrainRowFinder(weka.core.Instances data)
Performs the actual training of the row finder with the specified dataset.String
filterTipText()
Returns the tip text for this property.adams.core.Range
getAttributeRange()
Returns the attribute range to work on.weka.filters.Filter
getFilter()
Returns the IQR filter.double
getIqr()
Returns the iqr multiplier.weka.filters.Filter
getPreFilter()
Returns the pre filter.String
globalInfo()
Returns a string describing the object.protected void
initialize()
Initializes the members.String
iqrTipText()
Returns the tip text for this property.String
preFilterTipText()
Returns the tip text for this property.protected void
reset()
Resets the object.void
setAttributeRange(adams.core.Range value)
Sets the attribute range to work on.void
setFilter(weka.filters.Filter value)
Sets the IQR filter.void
setIqr(double value)
Sets the IQR multiplier.void
setPreFilter(weka.filters.Filter value)
Sets the pre filter.-
Methods inherited from class adams.data.weka.rowfinder.AbstractTrainableRowFinder
check, isRowFinderTrained, trainRowFinder
-
Methods inherited from class adams.data.weka.rowfinder.AbstractRowFinder
arrayToHashSet, compareTo, equals, findRows, forCommandLine, forName, getRowFinders, shallowCopy, shallowCopy
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, 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, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Field Detail
-
m_PreFilter
protected weka.filters.Filter m_PreFilter
the filter to apply to the data first.
-
m_Filter
protected weka.filters.unsupervised.attribute.InterquartileRange m_Filter
the IQR filter.
-
m_ActualFilter
protected weka.filters.unsupervised.attribute.InterquartileRange m_ActualFilter
the actual IQR filter.
-
m_IQR
protected double m_IQR
the maximum value of the attribute.
-
m_Range
protected adams.core.Range m_Range
the attribute range to work on.
-
m_FullFilter
protected weka.filters.MultiFilter m_FullFilter
theMultiFilter
doing all the filtering.
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfo
in interfaceadams.core.GlobalInfoSupporter
- Specified by:
globalInfo
in classadams.core.option.AbstractOptionHandler
- Returns:
- a description suitable for displaying in the gui
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptions
in interfaceadams.core.option.OptionHandler
- Overrides:
defineOptions
in classadams.core.option.AbstractOptionHandler
-
initialize
protected void initialize()
Initializes the members.- Overrides:
initialize
in classadams.core.option.AbstractOptionHandler
-
reset
protected void reset()
Resets the object.- Overrides:
reset
in classAbstractTrainableRowFinder
-
setPreFilter
public void setPreFilter(weka.filters.Filter value)
Sets the pre filter.- Parameters:
value
- the filter
-
getPreFilter
public weka.filters.Filter getPreFilter()
Returns the pre filter.- Returns:
- the filter
-
preFilterTipText
public String preFilterTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setFilter
public void setFilter(weka.filters.Filter value)
Sets the IQR filter.- Parameters:
value
- the filter
-
getFilter
public weka.filters.Filter getFilter()
Returns the IQR filter.- Returns:
- the filter
-
filterTipText
public String filterTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setIqr
public void setIqr(double value)
Sets the IQR multiplier.- Parameters:
value
- iqr
-
getIqr
public double getIqr()
Returns the iqr multiplier.- Returns:
- the iqr
-
iqrTipText
public String iqrTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setAttributeRange
public void setAttributeRange(adams.core.Range value)
Sets the attribute range to work on.- Parameters:
value
- the range
-
getAttributeRange
public adams.core.Range getAttributeRange()
Returns the attribute range to work on.- Returns:
- the range
-
attributeRangeTipText
public String attributeRangeTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
doTrainRowFinder
protected boolean doTrainRowFinder(weka.core.Instances data)
Performs the actual training of the row finder with the specified dataset.- Specified by:
doTrainRowFinder
in classAbstractTrainableRowFinder
- Parameters:
data
- the training data- Returns:
- true if successfully trained
-
doFindRows
protected int[] doFindRows(weka.core.Instances data)
Returns the rows of interest in the dataset.- Specified by:
doFindRows
in classAbstractRowFinder
- Parameters:
data
- the dataset to inspect- Returns:
- the rows of interest
-
-