Package adams.core.discovery.genetic
Class AbstractGeneticDoubleMatrixDiscoveryHandler
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.core.discovery.AbstractDiscoveryHandler
-
- adams.core.discovery.genetic.AbstractGeneticDiscoveryHandler
-
- adams.core.discovery.genetic.AbstractGeneticDoubleMatrixDiscoveryHandler
-
- All Implemented Interfaces:
adams.core.Destroyable
,adams.core.GlobalInfoSupporter
,adams.core.logging.LoggingLevelHandler
,adams.core.logging.LoggingSupporter
,adams.core.option.OptionHandler
,adams.core.ShallowCopySupporter<adams.core.discovery.AbstractDiscoveryHandler>
,adams.core.SizeOfHandler
,Serializable
- Direct Known Subclasses:
SIMPLSWeightsMatrix
public abstract class AbstractGeneticDoubleMatrixDiscoveryHandler extends adams.core.discovery.genetic.AbstractGeneticDiscoveryHandler
Ancestor for genetic discovery handlers that handle matrix properties.- Version:
- $Revision$
- Author:
- Dale (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected int
m_Columns
num columnsprotected double
m_Maximum
the maximum.protected double
m_Minimum
the minimum.protected int
m_Rows
num rowsprotected int
m_Splits
the number of splits.
-
Constructor Summary
Constructors Constructor Description AbstractGeneticDoubleMatrixDiscoveryHandler()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected int
calcNumBits()
Calculates the number of bits to use.String
columnsTipText()
Returns the tip text for this property.void
defineOptions()
Adds options to the internal list of options.protected String
doPack(adams.core.discovery.PropertyPath.PropertyContainer cont)
Returns the packed bits for the genetic algorithm.protected void
doUnpack(adams.core.discovery.PropertyPath.PropertyContainer cont, String bits)
Unpacks and applies the bits from the genetic algorithm.int
getColumns()
Returns the size.protected abstract int
getDefaultColumns()
Returns the default size.protected abstract double
getDefaultMaximum()
Returns the default maximum.protected abstract double
getDefaultMinimum()
Returns the default minimum.protected abstract int
getDefaultRows()
Returns the default size.protected abstract int
getDefaultSplits()
Returns the default splits.double
getMaximum()
Returns the maximum.double
getMinimum()
Returns the minimum.int
getNumBits()
Returns the number of required bits.int
getRows()
Returns the size.int
getSplits()
Returns the minimum.protected abstract weka.core.matrix.Matrix
getValue(adams.core.discovery.PropertyPath.PropertyContainer cont)
Returns the integer value from the property container.String
maximumTipText()
Returns the tip text for this property.String
minimumTipText()
Returns the tip text for this property.String
rowsTipText()
Returns the tip text for this property.void
setColumns(int value)
Sets the size of array.void
setMaximum(double value)
Sets the maximum.void
setMinimum(double value)
Sets the minimum.void
setRows(int value)
Sets the size of array.void
setSplits(int value)
Sets the splits.protected abstract void
setValue(adams.core.discovery.PropertyPath.PropertyContainer cont, weka.core.matrix.Matrix value)
Sets the integer value in the property container.String
splitsTipText()
Returns the tip text for this property.-
Methods inherited from class adams.core.discovery.genetic.AbstractGeneticDiscoveryHandler
pack, performInitialization, requiresInitialization, unpack
-
Methods inherited from class adams.core.discovery.AbstractDiscoveryHandler
addContainer, getContainers, getInvertMatching, getRegExp, handles, handles, invertMatchingTipText, regExpTipText, reset, setInvertMatching, setRegExp, shallowCopy, shallowCopy, toString
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, globalInfo, initialize, loggingLevelTipText, newOptionManager, setLoggingLevel, toCommandLine
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
-
-
-
Method Detail
-
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.discovery.AbstractDiscoveryHandler
-
getDefaultSplits
protected abstract int getDefaultSplits()
Returns the default splits.- Returns:
- the default
-
setSplits
public void setSplits(int value)
Sets the splits.- Parameters:
value
- the splits
-
getSplits
public int getSplits()
Returns the minimum.- Returns:
- the minimum
-
splitsTipText
public String splitsTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
getDefaultRows
protected abstract int getDefaultRows()
Returns the default size.- Returns:
- the default
-
getDefaultColumns
protected abstract int getDefaultColumns()
Returns the default size.- Returns:
- the default
-
getDefaultMinimum
protected abstract double getDefaultMinimum()
Returns the default minimum.- Returns:
- the default
-
setColumns
public void setColumns(int value)
Sets the size of array.- Parameters:
value
- the size
-
getColumns
public int getColumns()
Returns the size.- Returns:
- the size
-
columnsTipText
public String columnsTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setRows
public void setRows(int value)
Sets the size of array.- Parameters:
value
- the size
-
getRows
public int getRows()
Returns the size.- Returns:
- the size
-
rowsTipText
public String rowsTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setMinimum
public void setMinimum(double value)
Sets the minimum.- Parameters:
value
- the minimum
-
getMinimum
public double getMinimum()
Returns the minimum.- Returns:
- the minimum
-
minimumTipText
public String minimumTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
getDefaultMaximum
protected abstract double getDefaultMaximum()
Returns the default maximum.- Returns:
- the default
-
setMaximum
public void setMaximum(double value)
Sets the maximum.- Parameters:
value
- the maximum
-
getMaximum
public double getMaximum()
Returns the maximum.- Returns:
- the maximum
-
maximumTipText
public String maximumTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
getValue
protected abstract weka.core.matrix.Matrix getValue(adams.core.discovery.PropertyPath.PropertyContainer cont)
Returns the integer value from the property container.- Parameters:
cont
- the container- Returns:
- the value
-
doPack
protected String doPack(adams.core.discovery.PropertyPath.PropertyContainer cont)
Returns the packed bits for the genetic algorithm.- Specified by:
doPack
in classadams.core.discovery.genetic.AbstractGeneticDiscoveryHandler
- Parameters:
cont
- the container to obtain the value from to turn into a string- Returns:
- the bits
-
setValue
protected abstract void setValue(adams.core.discovery.PropertyPath.PropertyContainer cont, weka.core.matrix.Matrix value)
Sets the integer value in the property container.- Parameters:
cont
- the containervalue
- the value to set
-
doUnpack
protected void doUnpack(adams.core.discovery.PropertyPath.PropertyContainer cont, String bits)
Unpacks and applies the bits from the genetic algorithm.- Specified by:
doUnpack
in classadams.core.discovery.genetic.AbstractGeneticDiscoveryHandler
- Parameters:
cont
- the container to set the value for created from the stringbits
- the bits to use
-
calcNumBits
protected int calcNumBits()
Calculates the number of bits to use.- Returns:
- the number of bits
-
getNumBits
public int getNumBits()
Returns the number of required bits.- Specified by:
getNumBits
in classadams.core.discovery.genetic.AbstractGeneticDiscoveryHandler
- Returns:
- the number of bits
-
-