Package weka.classifiers.functions
Class GaussianProcessesAdaptive
- java.lang.Object
-
- weka.classifiers.AbstractClassifier
-
- weka.classifiers.functions.GaussianProcessesAdaptive
-
- All Implemented Interfaces:
Serializable
,Cloneable
,weka.classifiers.Classifier
,weka.classifiers.IntervalEstimator
,weka.core.BatchPredictor
,weka.core.CapabilitiesHandler
,weka.core.CapabilitiesIgnorer
,weka.core.CommandlineRunnable
,weka.core.OptionHandler
,weka.core.RevisionHandler
,weka.core.TechnicalInformationHandler
,weka.core.WeightedInstancesHandler
public class GaussianProcessesAdaptive extends weka.classifiers.AbstractClassifier implements weka.core.OptionHandler, weka.classifiers.IntervalEstimator, weka.core.TechnicalInformationHandler, weka.core.WeightedInstancesHandler
Implements Gaussian Processes for regression without hyperparameter-tuning. For more information see
David J.C. Mackay (1998). Introduction to Gaussian Processes. Dept. of Physics, Cambridge University, UK.
BibTeX:@misc{Mackay1998, address = {Dept. of Physics, Cambridge University, UK}, author = {David J.C. Mackay}, title = {Introduction to Gaussian Processes}, year = {1998}, PS = {http://wol.ra.phy.cam.ac.uk/mackay/gpB.ps.gz} }
Valid options are:
-D If set, classifier is run in debug mode and may output additional info to the console
-L <double> Level of Gaussian Noise. (default 0.1)
-M <double> Level of Gaussian Noise for the class. (default 0.1)
-F <double> Level of fDev. (default 0.0)
-N Whether to 0=normalize/1=standardize/2=neither. (default 0=normalize)
-K <classname and parameters> The Kernel to use. (default: weka.classifiers.functions.supportVector.PolyKernel)
Options specific to kernel weka.classifiers.functions.supportVector.RBFKernel:
-D Enables debugging output (if available) to be printed. (default: off)
-no-checks Turns off all checks - use with caution! (default: checks on)
-C <num> The size of the cache (a prime number), 0 for full cache and -1 to turn it off. (default: 250007)
-G <num> The Gamma parameter. (default: 0.01)
- Version:
- $Revision$
- Author:
- Kurt Driessens ([email protected])
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static int
FILTER_NONE
no filterstatic int
FILTER_NORMALIZE
normalizes the datastatic int
FILTER_STANDARDIZE
standardizes the dataprotected double
m_Alin
The parameters of the linear transforamtion realized by the filter on the class attributeprotected double
m_avg_target
The training data.protected double
m_Blin
protected boolean
m_checksTurnedOff
Turn off all checks and conversions? Turning them off assumes that data is purely numeric, doesn't contain any missing values, and has a numeric class.protected int
m_classIndex
The class index from the training dataprotected double
m_delta
Gaussian Noise Value.protected double
m_deltaClass
Gaussian Noise Value for class.protected weka.filters.Filter
m_Filter
The filter used to standardize/normalize all values.protected int
m_filterType
Whether to normalize/standardize/neitherprotected weka.classifiers.functions.supportVector.Kernel
m_kernel
Kernel to use *protected boolean
m_KernelIsLinear
whether the kernel is a linear onedouble[][]
m_L
(negative) covariance matrix in symmetric matrix representationprotected weka.filters.unsupervised.attribute.ReplaceMissingValues
m_Missing
The filter used to get rid of missing values.protected weka.filters.unsupervised.attribute.NominalToBinary
m_NominalToBinary
The filter used to make attributes numeric.protected int
m_NumTrain
The number of training instancesprotected weka.core.matrix.Matrix
m_t
The vector of target values.static weka.core.Tag[]
TAGS_FILTER
The filter to apply to the training data
-
Constructor Summary
Constructors Constructor Description GaussianProcessesAdaptive()
the default constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
buildClassifier(weka.core.Instances insts)
void
buildClassifier2(weka.core.Instances insts)
Method for building the classifier.double
classifyInstance(weka.core.Instance inst)
Classifies a given instance.String
classNoiseTipText()
Returns the tip text for this property.String
devTipText()
Returns the tip text for this property.String
filterTypeTipText()
Returns the tip text for this propertyweka.core.Capabilities
getCapabilities()
Returns default capabilities of the classifier.double
getClassNoise()
Get the value of noise for the class.double
getDev()
weka.core.SelectedTag
getFilterType()
Gets how the training data will be transformed.weka.classifiers.functions.supportVector.Kernel
getKernel()
Gets the kernel to use.double
getNoise()
Get the value of noise.String[]
getOptions()
Gets the current settings of the classifier.String
getRevision()
double
getStandardDeviation(weka.core.Instance inst)
Gives the variance of the prediction at the given instanceweka.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 classifierString
kernelTipText()
Returns the tip text for this propertyEnumeration
listOptions()
Returns an enumeration describing the available options.static void
main(String[] argv)
Main method for testing this class.String
noiseTipText()
Returns the tip text for this propertydouble[][]
predictIntervals(weka.core.Instance inst, double confidenceLevel)
Predicts a confidence interval for the given instance and confidence level.void
setClassNoise(double v)
Set the level of Gaussian Noise for the class.void
setDev(double v)
void
setFilterType(weka.core.SelectedTag newType)
Sets how the training data will be transformed.void
setKernel(weka.classifiers.functions.supportVector.Kernel value)
Sets the kernel to use.void
setNoise(double v)
Set the level of Gaussian Noise.void
setOptions(String[] options)
Parses a given list of options.String
toString()
Prints out 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
-
-
-
-
Field Detail
-
m_NominalToBinary
protected weka.filters.unsupervised.attribute.NominalToBinary m_NominalToBinary
The filter used to make attributes numeric.
-
FILTER_NORMALIZE
public static final int FILTER_NORMALIZE
normalizes the data- See Also:
- Constant Field Values
-
FILTER_STANDARDIZE
public static final int FILTER_STANDARDIZE
standardizes the data- See Also:
- Constant Field Values
-
FILTER_NONE
public static final int FILTER_NONE
no filter- See Also:
- Constant Field Values
-
TAGS_FILTER
public static final weka.core.Tag[] TAGS_FILTER
The filter to apply to the training data
-
m_Filter
protected weka.filters.Filter m_Filter
The filter used to standardize/normalize all values.
-
m_filterType
protected int m_filterType
Whether to normalize/standardize/neither
-
m_Missing
protected weka.filters.unsupervised.attribute.ReplaceMissingValues m_Missing
The filter used to get rid of missing values.
-
m_checksTurnedOff
protected boolean m_checksTurnedOff
Turn off all checks and conversions? Turning them off assumes that data is purely numeric, doesn't contain any missing values, and has a numeric class.
-
m_delta
protected double m_delta
Gaussian Noise Value.
-
m_deltaClass
protected double m_deltaClass
Gaussian Noise Value for class.
-
m_classIndex
protected int m_classIndex
The class index from the training data
-
m_Alin
protected double m_Alin
The parameters of the linear transforamtion realized by the filter on the class attribute
-
m_Blin
protected double m_Blin
-
m_kernel
protected weka.classifiers.functions.supportVector.Kernel m_kernel
Kernel to use *
-
m_NumTrain
protected int m_NumTrain
The number of training instances
-
m_avg_target
protected double m_avg_target
The training data.
-
m_L
public double[][] m_L
(negative) covariance matrix in symmetric matrix representation
-
m_t
protected weka.core.matrix.Matrix m_t
The vector of target values.
-
m_KernelIsLinear
protected boolean m_KernelIsLinear
whether the kernel is a linear one
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing classifier- Returns:
- a description suitable for displaying in the explorer/experimenter gui
-
getTechnicalInformation
public weka.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 interfaceweka.core.TechnicalInformationHandler
- Returns:
- the technical information about this class
-
getCapabilities
public weka.core.Capabilities getCapabilities()
Returns default capabilities of the classifier.- Specified by:
getCapabilities
in interfaceweka.core.CapabilitiesHandler
- Specified by:
getCapabilities
in interfaceweka.classifiers.Classifier
- Overrides:
getCapabilities
in classweka.classifiers.AbstractClassifier
- Returns:
- the capabilities of this classifier
-
buildClassifier
public void buildClassifier(weka.core.Instances insts) throws Exception
- Specified by:
buildClassifier
in interfaceweka.classifiers.Classifier
- Throws:
Exception
-
buildClassifier2
public void buildClassifier2(weka.core.Instances insts) throws Exception
Method for building the classifier.- Parameters:
insts
- the set of training instances- Throws:
Exception
- if the classifier can't be built successfully
-
classifyInstance
public double classifyInstance(weka.core.Instance inst) throws Exception
Classifies a given instance.- Specified by:
classifyInstance
in interfaceweka.classifiers.Classifier
- Overrides:
classifyInstance
in classweka.classifiers.AbstractClassifier
- Parameters:
inst
- the instance to be classified- Returns:
- the classification
- Throws:
Exception
- if instance could not be classified successfully
-
predictIntervals
public double[][] predictIntervals(weka.core.Instance inst, double confidenceLevel) throws Exception
Predicts a confidence interval for the given instance and confidence level.- Specified by:
predictIntervals
in interfaceweka.classifiers.IntervalEstimator
- Parameters:
inst
- the instance to make the prediction forconfidenceLevel
- the percentage of cases the interval should cover- Returns:
- a 1*2 array that contains the boundaries of the interval
- Throws:
Exception
- if interval could not be estimated successfully
-
getStandardDeviation
public double getStandardDeviation(weka.core.Instance inst) throws Exception
Gives the variance of the prediction at the given instance- Parameters:
inst
- the instance to get the variance for- Returns:
- tha variance
- Throws:
Exception
- if computation fails
-
listOptions
public Enumeration listOptions()
Returns an enumeration describing the available options.- Specified by:
listOptions
in interfaceweka.core.OptionHandler
- Overrides:
listOptions
in classweka.classifiers.AbstractClassifier
- Returns:
- an enumeration of all the available options.
-
setOptions
public void setOptions(String[] options) throws Exception
Parses a given list of options.
Valid options are:
-D If set, classifier is run in debug mode and may output additional info to the console
-L <double> Level of Gaussian Noise. (default 0.1)
-M <double> Level of Gaussian Noise for the class. (default 0.1)
-F <double> Level of fDev. (default 0.0)
-N Whether to 0=normalize/1=standardize/2=neither. (default 0=normalize)
-K <classname and parameters> The Kernel to use. (default: weka.classifiers.functions.supportVector.PolyKernel)
Options specific to kernel weka.classifiers.functions.supportVector.RBFKernel:
-D Enables debugging output (if available) to be printed. (default: off)
-no-checks Turns off all checks - use with caution! (default: checks on)
-C <num> The size of the cache (a prime number), 0 for full cache and -1 to turn it off. (default: 250007)
-G <num> The Gamma parameter. (default: 0.01)
- Specified by:
setOptions
in interfaceweka.core.OptionHandler
- Overrides:
setOptions
in classweka.classifiers.AbstractClassifier
- Parameters:
options
- the list of options as an array of strings- Throws:
Exception
- if an option is not supported
-
getOptions
public String[] getOptions()
Gets the current settings of the classifier.- Specified by:
getOptions
in interfaceweka.core.OptionHandler
- Overrides:
getOptions
in classweka.classifiers.AbstractClassifier
- Returns:
- an array of strings suitable for passing to setOptions
-
kernelTipText
public String kernelTipText()
Returns the tip text for this property- Returns:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
getKernel
public weka.classifiers.functions.supportVector.Kernel getKernel()
Gets the kernel to use.- Returns:
- the kernel
-
setKernel
public void setKernel(weka.classifiers.functions.supportVector.Kernel value)
Sets the kernel to use.- Parameters:
value
- the new kernel
-
filterTypeTipText
public String filterTypeTipText()
Returns the tip text for this property- Returns:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
getFilterType
public weka.core.SelectedTag getFilterType()
Gets how the training data will be transformed. Will be one of FILTER_NORMALIZE, FILTER_STANDARDIZE, FILTER_NONE.2200Instances- Returns:
- the filtering mode
-
setFilterType
public void setFilterType(weka.core.SelectedTag newType)
Sets how the training data will be transformed. Should be one of FILTER_NORMALIZE, FILTER_STANDARDIZE, FILTER_NONE.- Parameters:
newType
- the new filtering mode
-
noiseTipText
public String noiseTipText()
Returns the tip text for this property- Returns:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
getNoise
public double getNoise()
Get the value of noise.- Returns:
- Value of noise.
-
setNoise
public void setNoise(double v)
Set the level of Gaussian Noise.- Parameters:
v
- Value to assign to noise.
-
devTipText
public String devTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
setDev
public void setDev(double v)
-
getDev
public double getDev()
-
classNoiseTipText
public String classNoiseTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
getClassNoise
public double getClassNoise()
Get the value of noise for the class.- Returns:
- Value of noise.
-
setClassNoise
public void setClassNoise(double v)
Set the level of Gaussian Noise for the class.- Parameters:
v
- Value to assign to noise.
-
toString
public String toString()
Prints out the classifier.
-
main
public static void main(String[] argv)
Main method for testing this class.- Parameters:
argv
- the commandline parameters
-
getRevision
public String getRevision()
- Specified by:
getRevision
in interfaceweka.core.RevisionHandler
- Overrides:
getRevision
in classweka.classifiers.AbstractClassifier
-
-