Documentation of 'jsat.distributions.multivariate.ProductKDE' Java class
ProductKDE
jsat.distributions.multivariate

Class ProductKDE

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, MultivariateDistribution


    public class ProductKDE
    extends MultivariateKDE
    The Product Kernel Density Estimator is a generalization of the KernelDensityEstimator to the multivariate case. This is done by using a kernel and bandwidth for each dimension, such that the bandwidth for each dimension can be determined using the same methods as the univariate KDE. This can simplify the difficulty in bandwidth selection for the multivariate case.
    See Also:
    MetricKDE, Serialized Form
    • Constructor Detail

      • ProductKDE

        public ProductKDE()
        Creates a new KDE that uses the EpanechnikovKF kernel.
      • ProductKDE

        public ProductKDE(KernelFunction k)
        Creates a new KDE that uses the specified kernel
        Parameters:
        k - the kernel method to use
    • Method Detail

      • getNearby

        public java.util.List<VecPaired<VecPaired<Vec,java.lang.Integer>,java.lang.Double>> getNearby(Vec x)
        Description copied from class: MultivariateKDE
        Returns the list of vectors that have a non zero contribution to the density of the query point x. Each vector is paired with its integer index from the original constructing list vectors, and a double indicating its weight given the kernel function in use.
        Specified by:
        getNearby in class MultivariateKDE
        Parameters:
        x - the query point
        Returns:
        the list of near by vectors and their weights
      • getNearbyRaw

        public java.util.List<VecPaired<VecPaired<Vec,java.lang.Integer>,java.lang.Double>> getNearbyRaw(Vec x)
        Description copied from class: MultivariateKDE
        Returns the list of vectors that have a non zero contribution to the density of the query point x. Each vector is paired with its integer index from the original constructing list vectors, and a double indicating its distance from the query point divided by the bandwidth of the point.
        Specified by:
        getNearbyRaw in class MultivariateKDE
        Parameters:
        x - the query point
        Returns:
        the list of near by vectors and their weights
      • pdf

        public double pdf(Vec x)
        Description copied from interface: MultivariateDistribution
        Returns the probability of a given vector from this distribution. By definition, the probability will always be in the range [0, 1].
        Parameters:
        x - the vector the get the log probability of
        Returns:
        the probability
      • setUsingData

        public <V extends Vec> boolean setUsingData(java.util.List<V> dataSet,
                                                    boolean parallel)
        Description copied from interface: MultivariateDistribution
        Sets the parameters of the distribution to attempt to fit the given list of vectors. All vectors are assumed to have the same weight.
        Type Parameters:
        V - the vector type
        Parameters:
        dataSet - the list of data points
        parallel - true if the training should be done using multiple-cores, false for single threaded.
        Returns:
        true if the distribution was fit to the data, or false if the distribution could not be fit to the data set.
      • sample

        public java.util.List<Vec> sample(int count,
                                          java.util.Random rand)
        Description copied from interface: MultivariateDistribution
        Performs sampling on the current distribution.
        Parameters:
        count - the number of iid samples to draw
        rand - the source of randomness
        Returns:
        a list of sample vectors from this distribution
      • scaleBandwidth

        public void scaleBandwidth(double scale)
        Description copied from class: MultivariateKDE
        A caller may want to increase or decrease the bandwidth after training has been completed to get smoother model, or decrease it to observe behavior. This method will scaled the bandwidth of each data point by the given factor
        Specified by:
        scaleBandwidth in class MultivariateKDE
        Parameters:
        scale - the value to scale the bandwidth used

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.