Package adams.data.instancesanalysis.pls
Class PRM
-
- All Implemented Interfaces:
Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,SizeOfHandler
,TechnicalInformationHandler
,Serializable
,weka.core.CapabilitiesHandler
,GenericPLSMatrixAccess
public class PRM extends AbstractSingleClassPLS
- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected double
m_C
Tuning parameter.protected int
m_MaxIter
Inner loop maximum number of iterationsprotected int
m_NumSimplsCoefficients
the number of SIMPLS coefficients.protected com.github.waikatodatamining.matrix.algorithm.pls.PRM
m_PRM
the actual algorithm.protected double
m_Tol
Inner 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 PRM()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
cTipText()
Returns the tip text for this propertyvoid
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.double
getC()
Returns the tuning parameter.protected PreprocessingType
getDefaultPreprocessingType()
Returns the default preprocessing type.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
getMaxIter()
Returns the NIPALS loop maximum number of iterations.int
getNumSimplsCoefficients()
Returns the number of SIMPLS coefficients to keep.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.double
getTol()
Returns the inner NIPALS loop improvement tolerance.String
globalInfo()
Returns a string describing the object.boolean
hasLoadings()
Whether the algorithm supports return of loadings.String
maxIterTipText()
Returns the tip text for this propertyString
numSimplsCoefficientsTipText()
Returns the tip text for this propertyvoid
setC(double value)
Tuning parameter.void
setMaxIter(int value)
Sets the inner NIPALS loop maximum number of iterations.void
setNumSimplsCoefficients(int value)
Sets the number of SIMPLS coefficients to keep.void
setTol(double value)
Sets the inner NIPALS loop improvement tolerance.String
tolTipText()
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_PRM
protected com.github.waikatodatamining.matrix.algorithm.pls.PRM m_PRM
the actual algorithm.
-
m_Tol
protected double m_Tol
Inner loop improvement tolerance
-
m_MaxIter
protected int m_MaxIter
Inner loop maximum number of iterations
-
m_NumSimplsCoefficients
protected int m_NumSimplsCoefficients
the number of SIMPLS coefficients.
-
m_C
protected double m_C
Tuning parameter.
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfo
in interfaceGlobalInfoSupporter
- Specified by:
globalInfo
in 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:
getTechnicalInformation
in interfaceTechnicalInformationHandler
- 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 interfaceOptionHandler
- Overrides:
defineOptions
in classAbstractPLS
-
getDefaultPreprocessingType
protected PreprocessingType getDefaultPreprocessingType()
Returns the default preprocessing type.- Overrides:
getDefaultPreprocessingType
in 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
-
setNumSimplsCoefficients
public void setNumSimplsCoefficients(int value)
Sets the number of SIMPLS coefficients to keep. <= to keep all.- Parameters:
value
- the coefficients
-
getNumSimplsCoefficients
public int getNumSimplsCoefficients()
Returns the number of SIMPLS coefficients to keep. <= to keep all.- Returns:
- the coefficients
-
numSimplsCoefficientsTipText
public String numSimplsCoefficientsTipText()
Returns the tip text for this property- Returns:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
setC
public void setC(double value)
Tuning parameter.- Parameters:
value
- the C, > 0
-
getC
public double getC()
Returns the tuning parameter.- Returns:
- the C, > 0
-
cTipText
public String cTipText()
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
-
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
-
-