Documentation of 'smile.stat.distribution.KernelDensity' Java class
KernelDensity
smile.stat.distribution

Class KernelDensity

  • All Implemented Interfaces:
    Distribution


    public class KernelDensity
    extends java.lang.Object
    implements Distribution
    Kernel density estimation is a non-parametric way of estimating the probability density function of a random variable. Kernel density estimation is a fundamental data smoothing problem where inferences about the population are made, based on a finite data sample. It is also known as the Parzen window method.
    • Constructor Summary

      Constructors 
      Constructor and Description
      KernelDensity(double[] x)
      Constructor.
      KernelDensity(double[] x, double h)
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      double bandwidth()
      Returns the bandwidth of kernel.
      double cdf(double x)
      Cumulative distribution function.
      double entropy()
      Shannon entropy.
      double likelihood(double[] x)
      The likelihood of the samples.
      double logLikelihood(double[] x)
      The log likelihood of the samples.
      double logp(double x)
      The density at x in log scale, which may prevents the underflow problem.
      double mean()
      The mean of distribution.
      int npara()
      The number of parameters of the distribution.
      double p(double x)
      The probability density function for continuous distribution or probability mass function for discrete distribution at x.
      double quantile(double p)
      Inverse of CDF.
      double rand()
      Random number generator.
      double sd()
      The standard deviation of distribution.
      double var()
      The variance of distribution.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • KernelDensity

        public KernelDensity(double[] x)
        Constructor. The bandwidth of kernel will be estimated by the rule of thumb.
        Parameters:
        x - the samples to estimate the density function.
      • KernelDensity

        public KernelDensity(double[] x,
                             double h)
        Constructor.
        Parameters:
        x - the samples to estimate the density function.
        h - a bandwidth parameter for smoothing.
    • Method Detail

      • bandwidth

        public double bandwidth()
        Returns the bandwidth of kernel.
        Returns:
        the bandwidth of kernel
      • npara

        public int npara()
        Description copied from interface: Distribution
        The number of parameters of the distribution.
        Specified by:
        npara in interface Distribution
      • mean

        public double mean()
        Description copied from interface: Distribution
        The mean of distribution.
        Specified by:
        mean in interface Distribution
      • var

        public double var()
        Description copied from interface: Distribution
        The variance of distribution.
        Specified by:
        var in interface Distribution
      • sd

        public double sd()
        Description copied from interface: Distribution
        The standard deviation of distribution.
        Specified by:
        sd in interface Distribution
      • entropy

        public double entropy()
        Shannon entropy. Not supported.
        Specified by:
        entropy in interface Distribution
      • rand

        public double rand()
        Random number generator. Not supported.
        Specified by:
        rand in interface Distribution
      • p

        public double p(double x)
        Description copied from interface: Distribution
        The probability density function for continuous distribution or probability mass function for discrete distribution at x.
        Specified by:
        p in interface Distribution
      • logp

        public double logp(double x)
        Description copied from interface: Distribution
        The density at x in log scale, which may prevents the underflow problem.
        Specified by:
        logp in interface Distribution
      • cdf

        public double cdf(double x)
        Cumulative distribution function. Not supported.
        Specified by:
        cdf in interface Distribution
      • quantile

        public double quantile(double p)
        Inverse of CDF. Not supported.
        Specified by:
        quantile in interface Distribution
      • likelihood

        public double likelihood(double[] x)
        The likelihood of the samples. Not supported.
        Specified by:
        likelihood in interface Distribution
      • logLikelihood

        public double logLikelihood(double[] x)
        The log likelihood of the samples. Not supported.
        Specified by:
        logLikelihood in interface Distribution

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.