Package adams.data.instancesanalysis.pls
Class SparsePLS
-
- All Implemented Interfaces:
Destroyable,GlobalInfoSupporter,LoggingLevelHandler,LoggingSupporter,OptionHandler,SizeOfHandler,TechnicalInformationHandler,Serializable,weka.core.CapabilitiesHandler,GenericPLSMatrixAccess
public class SparsePLS extends AbstractSingleClassPLS
Nonlinear Iterative Partial Least Squares (SparsePLS).
Automatically standardizes X and Y internally.
For more information see:
Chun H, Keles S. (2010). Sparse partial least squares regression for simultaneous dimension reduction and variable selection. Royal Statistical Society Series B, Statistical Methodology. 1:3-25. URL https://www.ncbi.nlm.nih.gov/pmc/articles/PMC2810828/
@article{ChunH2010, author = {Chun H, Keles S.}, journal = {Royal Statistical Society Series B, Statistical Methodology}, pages = {3-25}, title = {Sparse partial least squares regression for simultaneous dimension reduction and variable selection}, volume = {1}, year = {2010}, URL = {https://www.ncbi.nlm.nih.gov/pmc/articles/PMC2810828/} }
-logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel) The logging level for outputting errors and debugging output. default: WARNING min-user-mode: Expert
-preprocessing-type <NONE|CENTER|STANDARDIZE> (property: preprocessingType) The type of preprocessing to perform. default: NONE
-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
-tol <double> (property: tol) The inner NIPALS loop improvement tolerance. default: 1.0E-7 minimum: 0.0
-max-iter <int> (property: maxIter) The inner NIPALS loop maximum number of iterations. default: 500 minimum: 1
-lambda <double> (property: lambda) The sparsity parameter; determines sparseness. default: 0.5 minimum: 0.0
- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected doublem_LambdaSparsity parameter.protected intm_MaxIterInner NIPALS loop maximum number of iterationsprotected com.github.waikatodatamining.matrix.algorithm.pls.SparsePLSm_SparsePLSthe actual algorithm.protected doublem_TolInner NIPALS loop improvement tolerance-
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
-
Fields inherited from class adams.core.option.AbstractOptionHandler
m_OptionManager
-
Fields inherited from class adams.core.logging.LoggingObject
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
-
Constructor Summary
Constructors Constructor Description SparsePLS()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddefineOptions()Adds options to the internal list of options.protected weka.core.InstancesdoTransform(weka.core.Instances data, Map<String,Object> params)Transforms the data, initializes if necessary.protected PreprocessingTypegetDefaultPreprocessingType()Returns the default preprocessing type.doublegetLambda()Returns the sparsity parameter; determines sparseness.weka.core.matrix.MatrixgetLoadings()Returns the loadings, if available.weka.core.matrix.MatrixgetMatrix(String name)Returns the matrix with the specified name.String[]getMatrixNames()Returns the all the available matrices.intgetMaxIter()Returns the NIPALS loop maximum number of iterations.TechnicalInformationgetTechnicalInformation()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.doublegetTol()Returns the inner NIPALS loop improvement tolerance.StringglobalInfo()Returns a string describing the object.booleanhasLoadings()Whether the algorithm supports return of loadings.StringlambdaTipText()Returns the tip text for this propertyStringmaxIterTipText()Returns the tip text for this propertyvoidsetLambda(double value)Sets sparsity parameter; determines sparseness.voidsetMaxIter(int value)Sets the inner NIPALS loop maximum number of iterations.voidsetTol(double value)Sets the inner NIPALS loop improvement tolerance.StringtolTipText()Returns the tip text for this property-
Methods inherited from class adams.data.instancesanalysis.pls.AbstractSingleClassPLS
determineOutputFormat, postTransform, preTransform, reset
-
Methods inherited from class adams.data.instancesanalysis.pls.AbstractPLS
getCapabilities, 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
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
-
-
-
Field Detail
-
m_SparsePLS
protected com.github.waikatodatamining.matrix.algorithm.pls.SparsePLS m_SparsePLS
the actual algorithm.
-
m_Tol
protected double m_Tol
Inner NIPALS loop improvement tolerance
-
m_MaxIter
protected int m_MaxIter
Inner NIPALS loop maximum number of iterations
-
m_Lambda
protected double m_Lambda
Sparsity parameter. Determines sparseness.
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfoin interfaceGlobalInfoSupporter- Specified by:
globalInfoin classAbstractOptionHandler- Returns:
- a description suitable for displaying in the gui
-
getTechnicalInformation
public 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:
getTechnicalInformationin interfaceTechnicalInformationHandler- Specified by:
getTechnicalInformationin classAbstractPLS- Returns:
- the technical information about this class
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptionsin interfaceOptionHandler- Overrides:
defineOptionsin classAbstractPLS
-
getDefaultPreprocessingType
protected PreprocessingType getDefaultPreprocessingType()
Returns the default preprocessing type.- Overrides:
getDefaultPreprocessingTypein classAbstractPLS- Returns:
- the default
-
setTol
public void setTol(double value)
Sets the inner NIPALS loop improvement tolerance.- Parameters:
value- the tolerance
-
getTol
public double getTol()
Returns the inner NIPALS loop improvement tolerance.- Returns:
- the tolerance
-
tolTipText
public String tolTipText()
Returns the tip text for this property- Returns:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
setMaxIter
public void setMaxIter(int value)
Sets the inner NIPALS loop maximum number of iterations.- Parameters:
value- the maximum
-
getMaxIter
public int getMaxIter()
Returns the NIPALS loop maximum number of iterations.- Returns:
- the maximum
-
maxIterTipText
public String maxIterTipText()
Returns the tip text for this property- Returns:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
setLambda
public void setLambda(double value)
Sets sparsity parameter; determines sparseness.- Parameters:
value- the lambda
-
getLambda
public double getLambda()
Returns the sparsity parameter; determines sparseness.- Returns:
- the lambda
-
lambdaTipText
public String lambdaTipText()
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:
getMatrixNamesin interfaceGenericPLSMatrixAccess- Specified by:
getMatrixNamesin 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:
getMatrixin interfaceGenericPLSMatrixAccess- Specified by:
getMatrixin 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:
hasLoadingsin interfaceGenericPLSMatrixAccess- Specified by:
hasLoadingsin classAbstractPLS- Returns:
- true if supported
- See Also:
getLoadings()
-
getLoadings
public weka.core.matrix.Matrix getLoadings()
Returns the loadings, if available.- Specified by:
getLoadingsin interfaceGenericPLSMatrixAccess- Specified by:
getLoadingsin classAbstractPLS- Returns:
- the loadings, null if not available
-
doTransform
protected weka.core.Instances doTransform(weka.core.Instances data, Map<String,Object> params) throws ExceptionTransforms the data, initializes if necessary.- Specified by:
doTransformin classAbstractPLS- Parameters:
data- the data to useparams- additional parameters- Returns:
- the transformed data
- Throws:
Exception
-
-