Package adams.data.heatmapfeatures
Class Histogram
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.data.heatmapfeatures.AbstractHeatmapFeatureGenerator
-
- adams.data.heatmapfeatures.AbstractHeatmapFeatureGeneratorWithSkippableMissingValues
-
- adams.data.heatmapfeatures.Histogram
-
- All Implemented Interfaces:
adams.core.CleanUpHandler
,adams.core.Destroyable
,adams.core.GlobalInfoSupporter
,adams.core.logging.LoggingLevelHandler
,adams.core.logging.LoggingSupporter
,adams.core.option.OptionHandler
,adams.core.QuickInfoSupporter
,adams.core.ShallowCopySupporter<AbstractHeatmapFeatureGenerator>
,adams.core.SizeOfHandler
,Serializable
,Comparable
public class Histogram extends AbstractHeatmapFeatureGeneratorWithSkippableMissingValues
Generates a histogram.
-logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel) The logging level for outputting errors and debugging output. default: WARNING
-converter <adams.data.featureconverter.AbstractFeatureConverter> (property: converter) The feature converter to use to produce the output data. default: adams.data.featureconverter.SpreadSheet -data-row-type adams.data.spreadsheet.DenseDataRow -spreadsheet-type adams.data.spreadsheet.SpreadSheet
-field <adams.data.report.Field> [-field ...] (property: fields) The fields to add to the output. default:
-notes <adams.core.base.BaseString> [-notes ...] (property: notes) The notes to add as attributes to the generated data, eg 'PROCESS INFORMATION' . default:
-skip-missing <boolean> (property: skipMissing) If enabled, missing values get skipped when collecting the values for the histogram. default: false
-num-bins <int> (property: numBins) The number of bins to use in case of manual bin calculation. default: 50 minimum: 1
-use-fixed-min-max <boolean> (property: useFixedMinMax) If enabled, then the user-specified min/max values are used for the bin calculation rather than the min/max from the data (allows comparison of histograms when generating histograms over a range of arrays). default: false
-manual-min <double> (property: manualMin) The minimum to use when using manual binning with user-supplied min/max enabled. default: 0.0
-manual-max <double> (property: manualMax) The maximum to use when using manual binning with user-supplied max/max enabled. default: 1.0
- Version:
- $Revision: 9598 $
- Author:
- fracpete (fracpete at waikato dot ac dot nz), Dale (dale at cs dot waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected double
m_ManualMax
the manual maximum.protected double
m_ManualMin
the manual minimum.protected int
m_NumBins
the number of bins in case of manual bin calculation.protected boolean
m_UseFixedMinMax
whether to use fixed min/max for manual bin calculation.-
Fields inherited from class adams.data.heatmapfeatures.AbstractHeatmapFeatureGeneratorWithSkippableMissingValues
m_SkipMissing
-
Fields inherited from class adams.data.heatmapfeatures.AbstractHeatmapFeatureGenerator
m_Converter, m_Fields, m_Notes
-
-
Constructor Summary
Constructors Constructor Description Histogram()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description adams.data.featureconverter.HeaderDefinition
createHeader(Heatmap map)
Creates the header from a template heatmap.void
defineOptions()
Adds options to the internal list of options.List<Object>[]
generateRows(Heatmap map)
Performs the actual feature generation.double
getManualMax()
Returns the maximum to use when using manual binning with user-supplied max/max enabled.double
getManualMin()
Returns the minimum to use when using manual binning with user-supplied min/max enabled.int
getNumBins()
Returns the number of bins to use in manual calculation.boolean
getUseFixedMinMax()
Returns whether to use user-supplied min/max for bin calculation rather than obtain min/max from data.String
globalInfo()
Returns a string describing the object.String
manualMaxTipText()
Returns the tip text for this property.String
manualMinTipText()
Returns the tip text for this property.String
numBinsTipText()
Returns the tip text for this property.void
setManualMax(double value)
Sets the maximum to use when using manual binning with user-supplied max/max enabled.void
setManualMin(double value)
Sets the minimum to use when using manual binning with user-supplied min/max enabled.void
setNumBins(int value)
Sets the number of bins to use in manual calculation.void
setUseFixedMinMax(boolean value)
Sets whether to use user-supplied min/max for bin calculation rather than obtain min/max from data.String
useFixedMinMaxTipText()
Returns the tip text for this property.-
Methods inherited from class adams.data.heatmapfeatures.AbstractHeatmapFeatureGeneratorWithSkippableMissingValues
getSkipMissing, setSkipMissing, skipMissingTipText
-
Methods inherited from class adams.data.heatmapfeatures.AbstractHeatmapFeatureGenerator
checkData, cleanUp, compareTo, converterTipText, destroy, equals, fieldsTipText, generate, getConverter, getDatasetFormat, getFields, getNotes, getQuickInfo, getRowFormat, notesTipText, postProcessHeader, postProcessRow, postProcessRows, reset, setConverter, setFields, setNotes, shallowCopy, shallowCopy
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, finishInit, getDefaultLoggingLevel, getOptionManager, initialize, loggingLevelTipText, newOptionManager, setLoggingLevel, toCommandLine, toString
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
-
-
-
Field Detail
-
m_NumBins
protected int m_NumBins
the number of bins in case of manual bin calculation.
-
m_UseFixedMinMax
protected boolean m_UseFixedMinMax
whether to use fixed min/max for manual bin calculation.
-
m_ManualMin
protected double m_ManualMin
the manual minimum.
-
m_ManualMax
protected double m_ManualMax
the manual maximum.
-
-
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 classAbstractHeatmapFeatureGeneratorWithSkippableMissingValues
-
setNumBins
public void setNumBins(int value)
Sets the number of bins to use in manual calculation.- Parameters:
value
- the number of bins
-
getNumBins
public int getNumBins()
Returns the number of bins to use in manual calculation.- Returns:
- the number of bins
-
numBinsTipText
public String numBinsTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setUseFixedMinMax
public void setUseFixedMinMax(boolean value)
Sets whether to use user-supplied min/max for bin calculation rather than obtain min/max from data.- Parameters:
value
- true if to use user-supplied min/max
-
getUseFixedMinMax
public boolean getUseFixedMinMax()
Returns whether to use user-supplied min/max for bin calculation rather than obtain min/max from data.- Returns:
- true if to use user-supplied min/max
-
useFixedMinMaxTipText
public String useFixedMinMaxTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setManualMin
public void setManualMin(double value)
Sets the minimum to use when using manual binning with user-supplied min/max enabled.- Parameters:
value
- the minimum
-
getManualMin
public double getManualMin()
Returns the minimum to use when using manual binning with user-supplied min/max enabled.- Returns:
- the minimum
-
manualMinTipText
public String manualMinTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setManualMax
public void setManualMax(double value)
Sets the maximum to use when using manual binning with user-supplied max/max enabled.- Parameters:
value
- the maximum
-
getManualMax
public double getManualMax()
Returns the maximum to use when using manual binning with user-supplied max/max enabled.- Returns:
- the maximum
-
manualMaxTipText
public String manualMaxTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
createHeader
public adams.data.featureconverter.HeaderDefinition createHeader(Heatmap map)
Creates the header from a template heatmap.- Specified by:
createHeader
in classAbstractHeatmapFeatureGenerator
- Parameters:
map
- the heatmap to act as a template- Returns:
- the generated header
-
generateRows
public List<Object>[] generateRows(Heatmap map)
Performs the actual feature generation.- Specified by:
generateRows
in classAbstractHeatmapFeatureGenerator
- Parameters:
map
- the heatmap to process- Returns:
- the generated features
-
-