Package adams.data.cleaner.instance
Class RemoveDuplicateSpectra
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.data.cleaner.instance.AbstractCleaner
-
- adams.data.cleaner.instance.RemoveDuplicateSpectra
-
- All Implemented Interfaces:
adams.core.Destroyable,adams.core.GlobalInfoSupporter,adams.core.logging.LoggingLevelHandler,adams.core.logging.LoggingSupporter,adams.core.option.OptionHandler,adams.core.Randomizable,adams.core.ShallowCopySupporter<AbstractCleaner>,adams.core.SizeOfHandler,adams.flow.core.FlowContextHandler,Serializable,Comparable
public class RemoveDuplicateSpectra extends AbstractCleaner implements adams.core.Randomizable
Removes duplicate spectra from the dataset.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classRemoveDuplicateSpectra.ModeThe removal mode.static classRemoveDuplicateSpectra.PostProcessingPost-removal operation.
-
Field Summary
Fields Modifier and Type Field Description protected RemoveDuplicateSpectra.Modem_Modehow the duplicates are removed.protected RemoveDuplicateSpectra.PostProcessingm_PostProcessingwhat to do after dataset has been processed.protected longm_Seedthe seed value.-
Fields inherited from class adams.data.cleaner.instance.AbstractCleaner
m_ActualPreFilter, m_CleanInstancesError, m_FlowContext, m_PreFilter
-
-
Constructor Summary
Constructors Constructor Description RemoveDuplicateSpectra()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected weka.core.Instancesaccurate(weka.core.Instances data)Performs an accurate identification of duplicates.voiddefineOptions()Adds options to the internal list of options.protected weka.core.Instancesfast(weka.core.Instances data)Performs a fast identification of duplicates.RemoveDuplicateSpectra.ModegetMode()Returns the mode for removing the duplicates.RemoveDuplicateSpectra.PostProcessinggetPostProcessing()Returns the post-processing to apply after duplicates may have been removed.longgetSeed()Returns the seed value.StringglobalInfo()Returns a string describing the object.StringmodeTipText()Returns the tip text for this property.protected StringperformCheck(weka.core.Instance data)Performs the actual check.protected weka.core.InstancesperformClean(weka.core.Instances data)Performs the actual check.StringpostProcessingTipText()Returns the tip text for this property.protected weka.core.Instancesremove(weka.core.Instances data, int[] indices)Removes the specified rows from the data.StringseedTipText()Returns the tip text for this property.voidsetMode(RemoveDuplicateSpectra.Mode value)Sets the mode for removing the duplicates.voidsetPostProcessing(RemoveDuplicateSpectra.PostProcessing value)Sets the post-processing to apply after duplicates may have been removed.voidsetSeed(long value)Sets the seed value.-
Methods inherited from class adams.data.cleaner.instance.AbstractCleaner
check, clean, compareTo, equals, forCommandLine, forName, getCleaners, getCleanInstancesError, getFlowContext, getPreFilter, hasCleanInstancesError, preCheck, preCheck, preFilter, preFilter, preFilterTipText, reset, setFlowContext, setPreFilter, shallowCopy, shallowCopy
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, initialize, loggingLevelTipText, newOptionManager, toCommandLine, toString
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
-
-
-
Field Detail
-
m_Mode
protected RemoveDuplicateSpectra.Mode m_Mode
how the duplicates are removed.
-
m_PostProcessing
protected RemoveDuplicateSpectra.PostProcessing m_PostProcessing
what to do after dataset has been processed.
-
m_Seed
protected long m_Seed
the seed value.
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfoin interfaceadams.core.GlobalInfoSupporter- Specified by:
globalInfoin 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:
defineOptionsin interfaceadams.core.option.OptionHandler- Overrides:
defineOptionsin classAbstractCleaner
-
setMode
public void setMode(RemoveDuplicateSpectra.Mode value)
Sets the mode for removing the duplicates.- Parameters:
value- the mode
-
getMode
public RemoveDuplicateSpectra.Mode getMode()
Returns the mode for removing the duplicates.- Returns:
- the mode
-
modeTipText
public String modeTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setPostProcessing
public void setPostProcessing(RemoveDuplicateSpectra.PostProcessing value)
Sets the post-processing to apply after duplicates may have been removed.- Parameters:
value- the type of post-processing
-
getPostProcessing
public RemoveDuplicateSpectra.PostProcessing getPostProcessing()
Returns the post-processing to apply after duplicates may have been removed.- Returns:
- the type of post-processing
-
postProcessingTipText
public String postProcessingTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setSeed
public void setSeed(long value)
Sets the seed value.- Specified by:
setSeedin interfaceadams.core.Randomizable- Parameters:
value- the seed
-
getSeed
public long getSeed()
Returns the seed value.- Specified by:
getSeedin interfaceadams.core.Randomizable- Returns:
- the seed
-
seedTipText
public String seedTipText()
Returns the tip text for this property.- Specified by:
seedTipTextin interfaceadams.core.Randomizable- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
performCheck
protected String performCheck(weka.core.Instance data)
Performs the actual check.- Specified by:
performCheckin classAbstractCleaner- Parameters:
data- the instance to check- Returns:
- null if ok, otherwise error message
-
remove
protected weka.core.Instances remove(weka.core.Instances data, int[] indices)Removes the specified rows from the data.- Parameters:
data- the data to processindices- the rows to remove- Returns:
- the reduced dataset (copy)
-
fast
protected weka.core.Instances fast(weka.core.Instances data)
Performs a fast identification of duplicates.- Parameters:
data- the data to check- Returns:
- the (potentially) updated dataset
-
accurate
protected weka.core.Instances accurate(weka.core.Instances data)
Performs an accurate identification of duplicates.- Parameters:
data- the data to check- Returns:
- the (potentially) updated dataset
-
performClean
protected weka.core.Instances performClean(weka.core.Instances data)
Performs the actual check.- Specified by:
performCleanin classAbstractCleaner- Parameters:
data- the instance to check- Returns:
- the cleaned data, null in case of error
-
-