Package edu.cmu.tetrad.search.utils
Class KernelGaussian
java.lang.Object
edu.cmu.tetrad.search.utils.KernelGaussian
- All Implemented Interfaces:
Kernel
Soces the Gaussian kernel for a given bandwidth. Default bandwidth is set using the median distance heuristic.
- Version:
- $Id: $Id
- Author:
- Robert Tillman
-
Constructor Summary
ConstructorsConstructorDescriptionKernelGaussian
(double sigma) Creates a new Gaussian kernel with the given bandwidthKernelGaussian
(DataSet dataset, Node node) Creates a new Gaussian kernel using the median distance between points to set the bandwidth -
Method Summary
Modifier and TypeMethodDescriptiondouble
eval
(double i, double j) Evaluates the kernel at two points in the input spacedouble
getBandwidth.void
setDefaultBw
(DataSet dataset, Node node) Sets bandwidth from data using default methodvoid
setMedianBandwidth
(DataSet dataset, Node node) Sets the bandwidth of the kernel to median distance between two points in the given vector
-
Constructor Details
-
KernelGaussian
public KernelGaussian(double sigma) Creates a new Gaussian kernel with the given bandwidth- Parameters:
sigma
- the bandwidth
-
KernelGaussian
Creates a new Gaussian kernel using the median distance between points to set the bandwidth- Parameters:
dataset
- dataet containing variable used to set bandwidthnode
- variable used to set bandwidth
-
-
Method Details
-
getBandwidth
public double getBandwidth()getBandwidth.
- Specified by:
getBandwidth
in interfaceKernel
- Returns:
- the bandwidth
-
eval
public double eval(double i, double j) Evaluates the kernel at two points in the input spaceEvaluates the kernel at two given points
-
setDefaultBw
Sets bandwidth from data using default methodDefault setting of bandwidth based on median distance heuristic
- Specified by:
setDefaultBw
in interfaceKernel
- Parameters:
dataset
- aDataSet
objectnode
- aNode
object
-
setMedianBandwidth
Sets the bandwidth of the kernel to median distance between two points in the given vector- Parameters:
dataset
- dataet containing variable used to set bandwidthnode
- variable used to set bandwidth
-