Package adams.data.instancesanalysis.pls
Class SIMPLS
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.data.instancesanalysis.pls.AbstractPLS
-
- adams.data.instancesanalysis.pls.AbstractSingleClassPLS
-
- adams.data.instancesanalysis.pls.SIMPLS
-
- All Implemented Interfaces:
adams.core.Destroyable
,adams.core.GlobalInfoSupporter
,adams.core.logging.LoggingLevelHandler
,adams.core.logging.LoggingSupporter
,adams.core.option.OptionHandler
,adams.core.SizeOfHandler
,adams.core.TechnicalInformationHandler
,Serializable
,weka.core.CapabilitiesHandler
,GenericPLSMatrixAccess
public class SIMPLS extends AbstractSingleClassPLS
Implementation of SIMPLS algorithm.
Available matrices: W, B
For more information see:
Tormod Naes, Tomas Isaksson, Tom Fearn, Tony Davies (2002). A User Friendly Guide to Multivariate Calibration and Classification. NIR Publications.
S. de Jong (1993). SIMPLS: an alternative approach to partial least squares regression. Chemometrics and Intelligent Laboratory Systems. 18:251-263.
@book{Naes2002, author = {Tormod Naes and Tomas Isaksson and Tom Fearn and Tony Davies}, publisher = {NIR Publications}, title = {A User Friendly Guide to Multivariate Calibration and Classification}, year = {2002}, ISBN = {0-9528666-2-5} } @article{Jong1993, author = {S. de Jong}, journal = {Chemometrics and Intelligent Laboratory Systems}, pages = {251-263}, title = {SIMPLS: an alternative approach to partial least squares regression}, volume = {18}, year = {1993} }
-logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel) The logging level for outputting errors and debugging output. default: WARNING
-preprocessing-type <NONE|CENTER|STANDARDIZE> (property: preprocessingType) The type of preprocessing to perform. default: CENTER
-replace-missing <boolean> (property: replaceMissing) Whether to replace missing values. default: false
-num-components <int> (property: numComponents) The number of components to compute. default: 20 minimum: 1
-prediction-type <NONE|ALL|EXCEPT_CLASS> (property: predictionType) The type of prediction to perform. default: NONE
-num-coefficients <int> (property: numCoefficients) The number of coefficients of W matrix to keep (rest gets zeroed); use 0 to keep all. default: 0 minimum: 0
- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected weka.core.matrix.Matrix
m_B
the B matrix (used for prediction)protected int
m_NumCoefficients
the number of coefficients in W to keep (0 keep all).protected weka.core.matrix.Matrix
m_W
the W matrix-
Fields inherited from class adams.data.instancesanalysis.pls.AbstractSingleClassPLS
m_ClassMean, m_ClassStdDev, m_Filter, m_Missing, PARAM_CLASSVALUES
-
Fields inherited from class adams.data.instancesanalysis.pls.AbstractPLS
m_Initialized, m_NumComponents, m_OutputFormat, m_PredictionType, m_PreprocessingType, m_ReplaceMissing
-
-
Constructor Summary
Constructors Constructor Description SIMPLS()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
defineOptions()
Adds options to the internal list of options.protected weka.core.Instances
doTransform(weka.core.Instances data, Map<String,Object> params)
Transforms the data, initializes if necessary.weka.core.matrix.Matrix
getLoadings()
Returns the loadings, if available.weka.core.matrix.Matrix
getMatrix(String name)
Returns the matrix with the specified name.String[]
getMatrixNames()
Returns the all the available matrices.int
getNumCoefficients()
returns the number of coefficients of W matrix to keep (rest gets zeroed).adams.core.TechnicalInformation
getTechnicalInformation()
Returns an instance of a TechnicalInformation object, containing detailed information about the technical background of this class, e.g., paper reference or book this class is based on.String
globalInfo()
Returns a string describing this class.boolean
hasLoadings()
Whether the algorithm supports return of loadings.String
numCoefficientsTipText()
Returns the tip text for this propertyvoid
reset()
Resets the scheme.void
setNumCoefficients(int value)
Sets the number of coefficients of W matrix to keep (rest gets zeroed).protected void
slim(weka.core.matrix.Matrix in)
Zeroes the coefficients of the W matrix beyond the specified number of coefficients.-
Methods inherited from class adams.data.instancesanalysis.pls.AbstractSingleClassPLS
determineOutputFormat, postTransform, preTransform
-
Methods inherited from class adams.data.instancesanalysis.pls.AbstractPLS
getCapabilities, getDefaultPreprocessingType, getNumComponents, getOutputFormat, getPredictionType, getPreprocessingType, getReplaceMissing, isInitialized, numComponentsTipText, predictionTypeTipText, preprocessingTypeTipText, replaceMissingTipText, setNumComponents, setPredictionType, setPreprocessingType, setReplaceMissing, transform
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, initialize, loggingLevelTipText, newOptionManager, setLoggingLevel, toCommandLine, toString
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
-
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing this class.- Specified by:
globalInfo
in interfaceadams.core.GlobalInfoSupporter
- Specified by:
globalInfo
in classadams.core.option.AbstractOptionHandler
- Returns:
- a description of the class suitable for displaying in the explorer/experimenter gui
-
getTechnicalInformation
public adams.core.TechnicalInformation getTechnicalInformation()
Returns an instance of a TechnicalInformation object, containing detailed information about the technical background of this class, e.g., paper reference or book this class is based on.- Specified by:
getTechnicalInformation
in interfaceadams.core.TechnicalInformationHandler
- Specified by:
getTechnicalInformation
in classAbstractPLS
- Returns:
- the technical information about this class
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptions
in interfaceadams.core.option.OptionHandler
- Overrides:
defineOptions
in classAbstractPLS
-
reset
public void reset()
Resets the scheme.- Overrides:
reset
in classAbstractSingleClassPLS
-
setNumCoefficients
public void setNumCoefficients(int value)
Sets the number of coefficients of W matrix to keep (rest gets zeroed).- Parameters:
value
- the number of coefficients, 0 to keep all
-
getNumCoefficients
public int getNumCoefficients()
returns the number of coefficients of W matrix to keep (rest gets zeroed).- Returns:
- the maximum number of attributes, 0 to keep all
-
numCoefficientsTipText
public String numCoefficientsTipText()
Returns the tip text for this property- Returns:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
getMatrixNames
public String[] getMatrixNames()
Returns the all the available matrices.- Specified by:
getMatrixNames
in interfaceGenericPLSMatrixAccess
- Specified by:
getMatrixNames
in classAbstractPLS
- Returns:
- the names of the matrices
-
getMatrix
public weka.core.matrix.Matrix getMatrix(String name)
Returns the matrix with the specified name.- Specified by:
getMatrix
in interfaceGenericPLSMatrixAccess
- Specified by:
getMatrix
in classAbstractPLS
- Parameters:
name
- the name of the matrix- Returns:
- the matrix, null if not available
-
hasLoadings
public boolean hasLoadings()
Whether the algorithm supports return of loadings.- Specified by:
hasLoadings
in interfaceGenericPLSMatrixAccess
- Specified by:
hasLoadings
in classAbstractPLS
- Returns:
- true if supported
- See Also:
getLoadings()
-
getLoadings
public weka.core.matrix.Matrix getLoadings()
Returns the loadings, if available.- Specified by:
getLoadings
in interfaceGenericPLSMatrixAccess
- Specified by:
getLoadings
in classAbstractPLS
- Returns:
- the loadings, null if not available
-
slim
protected void slim(weka.core.matrix.Matrix in)
Zeroes the coefficients of the W matrix beyond the specified number of coefficients.- Parameters:
in
- the matrix to process in-place
-
doTransform
protected weka.core.Instances doTransform(weka.core.Instances data, Map<String,Object> params) throws Exception
Transforms the data, initializes if necessary.- Specified by:
doTransform
in classAbstractPLS
- Parameters:
data
- the data to useparams
- additional parameters- Returns:
- the transformed data
- Throws:
Exception
-
-