public class GaussianProcesses extends RandomizableClassifier implements IntervalEstimator, ConditionalDensityEstimator, TechnicalInformationHandler, WeightedInstancesHandler
* @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}
* }
*
* * *
-L <double> * Level of Gaussian Noise wrt transformed target. (default 1)* *
-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)* *
-S <num> * Random number seed. * (default 1)* *
-output-debug-info * If set, classifier is run in debug mode and * may output additional info to the console* *
-do-not-check-capabilities * If set, classifier capabilities are not checked before classifier is built * (use with caution).* *
-num-decimal-places * The number of decimal places for the output of numbers in the model (default 2).* *
* Options specific to kernel weka.classifiers.functions.supportVector.PolyKernel: ** *
-E <num> * The Exponent to use. * (default: 1.0)* *
-L * Use lower-order terms. * (default: no)* *
-C <num> * The size of the cache (a prime number), 0 for full cache and * -1 to turn it off. * (default: 250007)* *
-output-debug-info * Enables debugging output (if available) to be printed. * (default: off)* *
-no-checks * Turns off all checks - use with caution! * (default: checks on)*
| Modifier and Type | Field and Description |
|---|---|
static int |
FILTER_NONE
no filter
|
static int |
FILTER_NORMALIZE
normalizes the data
|
static int |
FILTER_STANDARDIZE
standardizes the data
|
protected Kernel |
m_actualKernel
Actual kernel object to use
|
protected double |
m_Alin
The parameters of the linear transformation realized by the filter on the class attribute
|
protected double |
m_avg_target
The training data.
|
protected double |
m_Blin |
protected boolean |
m_checksTurnedOff
Turn off all checks and conversions?
|
protected double |
m_delta
Gaussian Noise Value.
|
protected double |
m_deltaSquared
The squared noise value.
|
protected Filter |
m_Filter
The filter used to standardize/normalize all values.
|
protected int |
m_filterType
Whether to normalize/standardize/neither
|
protected Kernel |
m_kernel
Template of kernel to use
|
no.uib.cipr.matrix.Matrix |
m_L
(negative) covariance matrix in symmetric matrix representation
|
protected ReplaceMissingValues |
m_Missing
The filter used to get rid of missing values.
|
protected NominalToBinary |
m_NominalToBinary
The filter used to make attributes numeric.
|
protected int |
m_NumTrain
The number of training instances
|
protected no.uib.cipr.matrix.Vector |
m_t
The vector of target values.
|
protected double[] |
m_weights
The weight of the training instances.
|
static Tag[] |
TAGS_FILTER
The filter to apply to the training data
|
m_SeedBATCH_SIZE_DEFAULT, m_BatchSize, m_Debug, m_DoNotCheckCapabilities, m_numDecimalPlaces, NUM_DECIMAL_PLACES_DEFAULT| Constructor and Description |
|---|
GaussianProcesses() |
| Modifier and Type | Method and Description |
|---|---|
void |
buildClassifier(Instances insts)
Method for building the classifier.
|
double |
classifyInstance(Instance inst)
Classifies a given instance.
|
protected double |
computeStdDev(Instance inst,
no.uib.cipr.matrix.Vector k)
Computes standard deviation for given instance, without transforming target back into original
space.
|
protected Instance |
filterInstance(Instance inst)
Filters an instance.
|
java.lang.String |
filterTypeTipText()
Returns the tip text for this property
|
Capabilities |
getCapabilities()
Returns default capabilities of the classifier.
|
SelectedTag |
getFilterType()
Gets how the training data will be transformed.
|
Kernel |
getKernel()
Gets the kernel to use.
|
double |
getNoise()
Get the value of noise.
|
java.lang.String[] |
getOptions()
Gets the current settings of the classifier.
|
double |
getStandardDeviation(Instance inst)
Gives standard deviation of the prediction at the given instance.
|
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.
|
java.lang.String |
globalInfo()
Returns a string describing classifier
|
java.lang.String |
kernelTipText()
Returns the tip text for this property
|
java.util.Enumeration<Option> |
listOptions()
Returns an enumeration describing the available options.
|
double |
logDensity(Instance inst,
double value)
Returns natural logarithm of density estimate for given value based on given instance.
|
static void |
main(java.lang.String[] argv)
Main method for testing this class.
|
java.lang.String |
noiseTipText()
Returns the tip text for this property
|
double[][] |
predictIntervals(Instance inst,
double confidenceLevel)
Computes a prediction interval for the given instance and confidence level.
|
void |
setFilterType(SelectedTag newType)
Sets how the training data will be transformed.
|
void |
setKernel(Kernel value)
Sets the kernel to use.
|
void |
setNoise(double v)
Set the level of Gaussian Noise.
|
void |
setOptions(java.lang.String[] options)
Parses a given list of options.
|
java.lang.String |
toString()
Prints out the classifier.
|
getSeed, seedTipText, setSeedbatchSizeTipText, debugTipText, distributionForInstance, distributionsForInstances, doNotCheckCapabilitiesTipText, forName, getBatchSize, getDebug, getDoNotCheckCapabilities, getNumDecimalPlaces, getRevision, implementsMoreEfficientBatchPrediction, makeCopies, makeCopy, numDecimalPlacesTipText, postExecution, preExecution, run, runClassifier, setBatchSize, setDebug, setDoNotCheckCapabilities, setNumDecimalPlacesprotected NominalToBinary m_NominalToBinary
public static final int FILTER_NORMALIZE
public static final int FILTER_STANDARDIZE
public static final int FILTER_NONE
public static final Tag[] TAGS_FILTER
protected Filter m_Filter
protected int m_filterType
protected ReplaceMissingValues m_Missing
protected boolean m_checksTurnedOff
protected double m_delta
protected double m_deltaSquared
protected double m_Alin
protected double m_Blin
protected Kernel m_kernel
protected Kernel m_actualKernel
protected int m_NumTrain
protected double m_avg_target
public no.uib.cipr.matrix.Matrix m_L
protected no.uib.cipr.matrix.Vector m_t
protected double[] m_weights
public java.lang.String globalInfo()
public TechnicalInformation getTechnicalInformation()
getTechnicalInformation in interface TechnicalInformationHandlerpublic Capabilities getCapabilities()
getCapabilities in interface ClassifiergetCapabilities in interface CapabilitiesHandlergetCapabilities in class AbstractClassifierCapabilitiespublic void buildClassifier(Instances insts) throws java.lang.Exception
buildClassifier in interface Classifierinsts - the set of training instancesjava.lang.Exception - if the classifier can't be built successfullypublic double classifyInstance(Instance inst) throws java.lang.Exception
classifyInstance in interface ClassifierclassifyInstance in class AbstractClassifierinst - the instance to be classifiedjava.lang.Exception - if instance could not be classified successfullyprotected Instance filterInstance(Instance inst) throws java.lang.Exception
java.lang.Exceptionprotected double computeStdDev(Instance inst, no.uib.cipr.matrix.Vector k) throws java.lang.Exception
java.lang.Exceptionpublic double[][] predictIntervals(Instance inst, double confidenceLevel) throws java.lang.Exception
predictIntervals in interface IntervalEstimatorinst - the instance to make the prediction forconfidenceLevel - the percentage of cases the interval should coverjava.lang.Exception - if interval could not be estimated successfullypublic double getStandardDeviation(Instance inst) throws java.lang.Exception
inst - the instance to get the standard deviation forjava.lang.Exception - if computation failspublic double logDensity(Instance inst, double value) throws java.lang.Exception
logDensity in interface ConditionalDensityEstimatorinst - the instance to make the prediction for.value - the value to make the prediction for.java.lang.Exception - if the density cannot be computedpublic java.util.Enumeration<Option> listOptions()
listOptions in interface OptionHandlerlistOptions in class RandomizableClassifierpublic void setOptions(java.lang.String[] options)
throws java.lang.Exception
* *
-L <double> * Level of Gaussian Noise wrt transformed target. (default 1)* *
-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)* *
-S <num> * Random number seed. * (default 1)* *
-output-debug-info * If set, classifier is run in debug mode and * may output additional info to the console* *
-do-not-check-capabilities * If set, classifier capabilities are not checked before classifier is built * (use with caution).* *
-num-decimal-places * The number of decimal places for the output of numbers in the model (default 2).* *
* Options specific to kernel weka.classifiers.functions.supportVector.PolyKernel: ** *
-E <num> * The Exponent to use. * (default: 1.0)* *
-L * Use lower-order terms. * (default: no)* *
-C <num> * The size of the cache (a prime number), 0 for full cache and * -1 to turn it off. * (default: 250007)* *
-output-debug-info * Enables debugging output (if available) to be printed. * (default: off)* *
-no-checks * Turns off all checks - use with caution! * (default: checks on)*
setOptions in interface OptionHandlersetOptions in class RandomizableClassifieroptions - the list of options as an array of stringsjava.lang.Exception - if an option is not supportedpublic java.lang.String[] getOptions()
getOptions in interface OptionHandlergetOptions in class RandomizableClassifierpublic java.lang.String kernelTipText()
public Kernel getKernel()
public void setKernel(Kernel value)
value - the new kernelpublic java.lang.String filterTypeTipText()
public SelectedTag getFilterType()
public void setFilterType(SelectedTag newType)
newType - the new filtering modepublic java.lang.String noiseTipText()
public double getNoise()
public void setNoise(double v)
v - Value to assign to noise.public java.lang.String toString()
toString in class java.lang.Objectpublic static void main(java.lang.String[] argv)
argv - the commandline parameters