Liking cljdoc? Tell your friends :D

fastmath.kernel.density


bandwidthclj

(bandwidth kernel data h)

Returns infered bandwidth (h).

h can be one of:

  • :nrd - rule-of-thumb (scale=1.06)
  • :nrd0 - rule-of-thumb (scake=0.9)
  • :nrd-adjust - kernel specific adjustment of :nrd, doesn't work for silverman and cauchy
  • :rlcv - robust likelihood cross-validation
  • :lcv - likelihood cross-validation
  • :lscv - least squares cross-validation
Returns infered bandwidth (h).

h can be one of:

* `:nrd` - rule-of-thumb (scale=1.06)
* `:nrd0` - rule-of-thumb (scake=0.9)
* `:nrd-adjust` - kernel specific adjustment of `:nrd`, doesn't work for `silverman` and `cauchy` 
* `:rlcv` - robust likelihood cross-validation
* `:lcv` - likelihood cross-validation
* `:lscv` - least squares cross-validation
sourceraw docstring

cauchyclj

(cauchy x)

Cauchy kernel, experimental

Cauchy kernel, experimental
sourceraw docstring

cosineclj

(cosine x)

Cosine kernel

Cosine kernel
sourceraw docstring

epanechnikovclj

(epanechnikov x)

Epanechnikov kernel

Epanechnikov kernel
sourceraw docstring

gaussianclj

(gaussian x)

Gaussian kernel

Gaussian kernel
sourceraw docstring

kde-dataclj

Collection of KDE data.

Keys - kernel keyword, vals - kernel data

  • :kernel - kernel fn
  • :k2 - integral of K(x)^2
  • :x2k - integral of x^2K(x)
  • :delta0 - canonical bandwidth
  • :efficiency - absolute efficiency
  • :radius - radius of the function where function is positive or greater than 1.0e-10
Collection of KDE data.

Keys - kernel keyword, vals - kernel data

* `:kernel` - kernel fn
* `:k2` - integral of K(x)^2
* `:x2k` - integral of x^2K(x)
* `:delta0` - canonical bandwidth
* `:efficiency` - absolute efficiency
* `:radius` - radius of the function where function is positive or greater than 1.0e-10
sourceraw docstring

kernel-densityclj

(kernel-density kernel data)
(kernel-density kernel data params)

Returns kernel density estimation function, 1d

Arguments:

  • kernel - kernel name or kernel function
  • data - data
  • params - a map containing:
    • :bandwidth - bandwidth h
    • :binned? - if data should be binned, if true the width of the bin is bandwidth divided by 5, if is a number then it will be used as denominator. Default: false.

:bandwidth can be a number or one of:

  • :nrd - rule-of-thumb (scale=1.06)
  • :nrd0 - rule-of-thumb (scake=0.9)
  • :nrd-adjust - kernel specific adjustment of :nrd, doesn't work for silverman and cauchy
  • :rlcv - robust likelihood cross-validation
  • :lcv - likelihood cross-validation
  • :lscv - least squares cross-validation
Returns kernel density estimation function, 1d

Arguments:
* `kernel` - kernel name or kernel function  
* `data` - data
* `params` - a map containing:
    * `:bandwidth` - bandwidth h
    * `:binned?` - if data should be binned, if `true` the width of the bin is `bandwidth` divided by 5, if is a number then it will be used as denominator. Default: `false`.

`:bandwidth` can be a number or one of:

* `:nrd` - rule-of-thumb (scale=1.06)
* `:nrd0` - rule-of-thumb (scake=0.9)
* `:nrd-adjust` - kernel specific adjustment of `:nrd`, doesn't work for `silverman` and `cauchy` 
* `:rlcv` - robust likelihood cross-validation
* `:lcv` - likelihood cross-validation
* `:lscv` - least squares cross-validation
sourceraw docstring

kernel-density+clj

(kernel-density+ kernel data)
(kernel-density+ kernel data {:keys [bandwidth binned?]})

Returns kernel density estimation function with additional information, 1d.

Returns a map:

  • :kde - density function
  • :factor - 1/nh
  • :h - provided or infered bandwidth
  • :mn and :mx - infered extent of the kde`

For arguments see kernel-density

Returns kernel density estimation function with additional information, 1d.

Returns a map:

* `:kde` - density function
* `:factor` - 1/nh
* `:h` - provided or infered bandwidth
* `:mn` and `:mx` - infered extent of the kde`

For arguments see [[kernel-density]]
sourceraw docstring

kernel-density-ciclj

(kernel-density-ci kernel data)
(kernel-density-ci kernel data {:keys [alpha] :or {alpha 0.05} :as params})

Create function which returns confidence intervals for given kde method.

Check 6.1.5 http://sfb649.wiwi.hu-berlin.de/fedc_homepage/xplore/tutorials/xlghtmlnode33.html

Arguments:

  • data - sequence of data values
  • kernel - kernel name
  • bandwidth - as in kde
  • alpha - confidence level parameter

Returns three values: density, lower confidence value and upper confidence value

Create function which returns confidence intervals for given kde method.

Check 6.1.5 http://sfb649.wiwi.hu-berlin.de/fedc_homepage/xplore/tutorials/xlghtmlnode33.html

Arguments:

* `data` - sequence of data values
* `kernel` - kernel name  
* `bandwidth` - as in `kde`
* `alpha` - confidence level parameter

Returns three values: density, lower confidence value and upper confidence value
sourceraw docstring

laplaceclj

(laplace x)

Laplace kernel, experimental

Laplace kernel, experimental
sourceraw docstring

lcv-targetclj

(lcv-target kdata)

Create target function to estimate bandwidth using Likelihood Cross Validation.

Create target function to estimate bandwidth using Likelihood Cross Validation.
sourceraw docstring

logisticclj

(logistic x)

Logistic kernel

Logistic kernel
sourceraw docstring

lscv-targetclj

(lscv-target kdata)

Create target function to estimate bandwidth using Least Squares Cross Validation.

Create target function to estimate bandwidth using Least Squares Cross Validation.
sourceraw docstring

quarticclj

(quartic x)

Quartic kernel

Quartic kernel
sourceraw docstring

rlcv-targetclj

(rlcv-target kdata)

Create target function to estimate bandwidth using Robust Likelihood Cross Validation.

Create target function to estimate bandwidth using Robust Likelihood Cross Validation.
sourceraw docstring

sigmoidclj

(sigmoid x)

Sigmoid kernel

Sigmoid kernel
sourceraw docstring

silvermanclj

(silverman x)

Silverman kernel

Silverman kernel
sourceraw docstring

triangularclj

(triangular x)

Triangular kernel

Triangular kernel
sourceraw docstring

tricubeclj

(tricube x)

Tricube kernel

Tricube kernel
sourceraw docstring

triweightclj

(triweight x)

Triweight kernel

Triweight kernel
sourceraw docstring

uniformclj

(uniform x)

Uniform kernel

Uniform kernel
sourceraw docstring

wignerclj

(wigner x)

Wigner kernel, experimental

Wigner kernel, experimental
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close