Package weka.classifiers.functions
Class PLSClassifierWeighted
- java.lang.Object
-
- weka.classifiers.AbstractClassifier
-
- weka.classifiers.functions.PLSClassifierWeighted
-
- All Implemented Interfaces:
Serializable,Cloneable,weka.classifiers.Classifier,weka.core.BatchPredictor,weka.core.CapabilitiesHandler,weka.core.CapabilitiesIgnorer,weka.core.CommandlineRunnable,weka.core.OptionHandler,weka.core.RevisionHandler,weka.core.WeightedInstancesHandler
- Direct Known Subclasses:
PLSClassifierWeightedWithLoadings
public class PLSClassifierWeighted extends weka.classifiers.AbstractClassifier implements weka.core.WeightedInstancesHandlerA wrapper classifier for the PLSFilter, utilizing the PLSFilter's ability to perform predictions.
Valid options are:
-filter <filter specification> The PLS filter to use. Full classname of filter to include, followed by scheme options. (default: weka.filters.supervised.attribute.PLSFilter)
-D If set, classifier is run in debug mode and may output additional info to the console
Options specific to filter weka.filters.supervised.attribute.PLSFilter ('-filter'):-D Turns on output of debugging information.
-C <num> The number of components to compute. (default: 20)
-U Updates the class attribute as well. (default: off)
-M Turns replacing of missing values on. (default: off)
-A <SIMPLS|PLS1> The algorithm to use. (default: PLS1)
-P <none|center|standardize> The type of preprocessing that is applied to the data. (default: center)
- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected weka.filters.supervised.attribute.PLSFilterm_ActualFilterthe actual filter to useprotected weka.filters.supervised.attribute.PLSFilterm_Filterthe PLS filter
-
Constructor Summary
Constructors Constructor Description PLSClassifierWeighted()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbuildClassifier(weka.core.Instances data)builds the classifierdoubleclassifyInstance(weka.core.Instance instance)Classifies the given test instance.StringfilterTipText()Returns the tip text for this propertyweka.core.CapabilitiesgetCapabilities()Returns default capabilities of the classifier.weka.filters.supervised.attribute.PLSFiltergetDefaultFilter()Returns the default PLS filter.weka.filters.FiltergetFilter()Get the PLS filter.String[]getOptions()returns the options of the current setupStringgetRevision()Returns the revision string.StringglobalInfo()Returns a string describing classifierEnumerationlistOptions()Gets an enumeration describing the available options.static voidmain(String[] args)Main method for running this classifier from commandline.voidsetFilter(weka.filters.Filter value)Set the PLS filter (only used for setup).voidsetOptions(String[] options)Parses the options for this object.StringtoString()returns a string representation of the classifier-
Methods inherited from class weka.classifiers.AbstractClassifier
batchSizeTipText, debugTipText, distributionForInstance, distributionsForInstances, doNotCheckCapabilitiesTipText, forName, getBatchSize, getDebug, getDoNotCheckCapabilities, getNumDecimalPlaces, implementsMoreEfficientBatchPrediction, makeCopies, makeCopy, numDecimalPlacesTipText, postExecution, preExecution, run, runClassifier, setBatchSize, setDebug, setDoNotCheckCapabilities, setNumDecimalPlaces
-
-
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing classifier- Returns:
- a description suitable for displaying in the explorer/experimenter gui
-
getDefaultFilter
public weka.filters.supervised.attribute.PLSFilter getDefaultFilter()
Returns the default PLS filter.- Returns:
- the default filter
-
listOptions
public Enumeration listOptions()
Gets an enumeration describing the available options.- Specified by:
listOptionsin interfaceweka.core.OptionHandler- Overrides:
listOptionsin classweka.classifiers.AbstractClassifier- Returns:
- an enumeration of all the available options.
-
getOptions
public String[] getOptions()
returns the options of the current setup- Specified by:
getOptionsin interfaceweka.core.OptionHandler- Overrides:
getOptionsin classweka.classifiers.AbstractClassifier- Returns:
- the current options
-
setOptions
public void setOptions(String[] options) throws Exception
Parses the options for this object.
Valid options are:
-filter <filter specification> The PLS filter to use. Full classname of filter to include, followed by scheme options. (default: weka.filters.supervised.attribute.PLSFilter)
-D If set, classifier is run in debug mode and may output additional info to the console
Options specific to filter weka.filters.supervised.attribute.PLSFilter ('-filter'):-D Turns on output of debugging information.
-C <num> The number of components to compute. (default: 20)
-U Updates the class attribute as well. (default: off)
-M Turns replacing of missing values on. (default: off)
-A <SIMPLS|PLS1> The algorithm to use. (default: PLS1)
-P <none|center|standardize> The type of preprocessing that is applied to the data. (default: center)
- Specified by:
setOptionsin interfaceweka.core.OptionHandler- Overrides:
setOptionsin classweka.classifiers.AbstractClassifier- Parameters:
options- the options to use- Throws:
Exception- if setting of options fails
-
filterTipText
public String filterTipText()
Returns the tip text for this property- Returns:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
setFilter
public void setFilter(weka.filters.Filter value) throws ExceptionSet the PLS filter (only used for setup).- Parameters:
value- the kernel filter.- Throws:
Exception- if not PLSFilter
-
getFilter
public weka.filters.Filter getFilter()
Get the PLS filter.- Returns:
- the PLS filter
-
getCapabilities
public weka.core.Capabilities getCapabilities()
Returns default capabilities of the classifier.- Specified by:
getCapabilitiesin interfaceweka.core.CapabilitiesHandler- Specified by:
getCapabilitiesin interfaceweka.classifiers.Classifier- Overrides:
getCapabilitiesin classweka.classifiers.AbstractClassifier- Returns:
- the capabilities of this classifier
-
buildClassifier
public void buildClassifier(weka.core.Instances data) throws Exceptionbuilds the classifier- Specified by:
buildClassifierin interfaceweka.classifiers.Classifier- Parameters:
data- the training instances- Throws:
Exception- if something goes wrong
-
classifyInstance
public double classifyInstance(weka.core.Instance instance) throws ExceptionClassifies the given test instance. The instance has to belong to a dataset when it's being classified.- Specified by:
classifyInstancein interfaceweka.classifiers.Classifier- Overrides:
classifyInstancein classweka.classifiers.AbstractClassifier- Parameters:
instance- the instance to be classified- Returns:
- the predicted most likely class for the instance or Instance.missingValue() if no prediction is made
- Throws:
Exception- if an error occurred during the prediction
-
toString
public String toString()
returns a string representation of the classifier
-
getRevision
public String getRevision()
Returns the revision string.- Specified by:
getRevisionin interfaceweka.core.RevisionHandler- Overrides:
getRevisionin classweka.classifiers.AbstractClassifier- Returns:
- the revision
-
main
public static void main(String[] args)
Main method for running this classifier from commandline.- Parameters:
args- the options
-
-