Liking cljdoc? Tell your friends :D

fastmath.kernel

Various kernel functions.

  • RBF (double -> double functions)
  • vector kernels (vector x vector -> double function; may be positive definite, conditional positive definite, positive semi-definite, mercer)
  • density estimation
  • some kernel operations
Various kernel functions.

* RBF (double -> double functions)
* vector kernels (vector x vector -> double function; may be positive definite, conditional positive definite, positive semi-definite, mercer)
* density estimation
* some kernel operations
raw docstring

approxclj

(approx k)
(approx k precision)

Kernel wrapper. Round value returned by kernel using fastmath.core/approx function.

Kernel wrapper. Round value returned by kernel using [[fastmath.core/approx]] function.
sourceraw docstring

cauchy-density-kernelclj

(cauchy-density-kernel x)
source

cosine-density-kernelclj

(cosine-density-kernel x)
source

cpd->pdclj

(cpd->pd k)

Convert conditionally positive definite kernel into positive definite.

Formula is based on this SO answer. x0 is equal 0.

Doesn't work well.

Convert conditionally positive definite kernel into positive definite.

Formula is based on this [SO answer](https://stats.stackexchange.com/questions/149889/prove-that-a-kernel-is-conditionally-positive-definite). `x0` is equal `0`.

Doesn't work well.
sourceraw docstring

epanechnikov-density-kernelclj

(epanechnikov-density-kernel x)
source

expclj

(exp k)
(exp k t)

Kernel wraper. exp of kernel k with optional scaling value t.

Kernel wraper. exp of kernel `k` with optional scaling value `t`.
sourceraw docstring

fieldsclj

(fields k f)
(fields k f1 f2)

Kernel wrapper. Apply vector field for each input before applying kernel function.

Kernel wrapper. Apply vector field for each input before applying kernel function.
sourceraw docstring

gaussian-density-kernelclj

(gaussian-density-kernel x)
source

kernelcljmultimethod

Crated vector kernel.

Kernels can be Mercer, positive definite, conditional positive definite, positive semi-definite or other.

Optional parameters:

For :gaussian, :exponential, :laplacian, :rational-quadratic, :multiquadratic, :inverse-multiquadratic, :circular, :spherical, :wave, :power, :log, :cauchy, :generalized-t-student, :hyperbolic-secant, :thin-plate, :mattern-12, :mattern-32, :mattern-52 and ::hyperbolic-secant you can provide scaling parameter and distance (see fastmath.distance, default is [[euclidean]]).

Others:

  • :linear - alpha, scaling parameter
  • :polynomial - alpha (scaling), c (shift) and d (power)
  • :anova - sigma (scaling), k and d (power)
  • :hyperbolic-tangent - alpha (scaling), c (shift)
  • :periodic - sigma (scaling), periodicity and distance
  • :bessel - sigma (scaling), n and v (power factors) and distance
  • :generalized-histogram - alpha and beta (power factors)
  • :dirichlet - N
  • :pearson - sigma (scaling) and omega (power)

Additionally there are two special kernels build from funcitons:

  • :scalar-functions - provide one or two double->double functions
  • :variance-function - provide any variance function (smooth, vector->double type)

The rest of the kernels do not require parameters.

Crated vector kernel.

Kernels can be Mercer, positive definite, conditional positive definite, positive semi-definite or other.

Optional parameters:

For `:gaussian`, `:exponential`, `:laplacian`, `:rational-quadratic`, `:multiquadratic`, `:inverse-multiquadratic`, `:circular`, `:spherical`, `:wave`, `:power`, `:log`, `:cauchy`, `:generalized-t-student`, `:hyperbolic-secant`, `:thin-plate`, `:mattern-12`, `:mattern-32`, `:mattern-52` and `::hyperbolic-secant` you can provide scaling parameter and `distance` (see [[fastmath.distance]], default is [[euclidean]]).

Others:

* `:linear` - `alpha`, scaling parameter
* `:polynomial` - `alpha` (scaling), `c` (shift) and `d` (power)
* `:anova` - `sigma` (scaling), `k` and `d` (power)
* `:hyperbolic-tangent` - `alpha` (scaling), `c` (shift)
* `:periodic` - `sigma` (scaling), `periodicity` and `distance`
* `:bessel` - `sigma` (scaling), `n` and `v` (power factors) and `distance`
* `:generalized-histogram` - `alpha` and `beta` (power factors)
* `:dirichlet` - `N`
* `:pearson` - `sigma` (scaling) and `omega` (power)

Additionally there are two special kernels build from funcitons:

* `:scalar-functions` - provide one or two double->double functions
* `:variance-function` - provide any variance function (smooth, vector->double type)

The rest of the kernels do not require parameters.
sourceraw docstring

kernel->rbfclj

(kernel->rbf k)
(kernel->rbf k center)

Convert vector kernel to RBF kernel. center is fixed y vector (default contains [[EPSILON]] values).

Convert vector kernel to RBF kernel. `center` is fixed `y` vector (default contains [[EPSILON]] values).
sourceraw docstring

kernel-densitycljmultimethod

Create kernel density estimator.

Parameters:

  • kernel name, see kernel-density-list.
  • sequence of data values
  • optional: bandwidth (by default, bandwidth is estimated using nrd method)
Create kernel density estimator.

Parameters:

* kernel name, see [[kernel-density-list]].
* sequence of data values
* optional: bandwidth (by default, bandwidth is estimated using nrd method)
sourceraw docstring

kernel-density-ciclj

(kernel-density-ci method data)
(kernel-density-ci method data bandwidth)
(kernel-density-ci method data bandwidth alpha)

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

Parameters:

  • method - kernel name
  • data - sequence of data values
  • bandwidth
  • alpha - confidence level parameter

Returns three values: density, lower confidence, upper confidence

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

Parameters:

* `method` - kernel name
* `data` - sequence of data values
* `bandwidth`
* `alpha` - confidence level parameter

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

kernel-density-listclj

source

kernels-listclj

source

laplace-density-kernelclj

(laplace-density-kernel x)
source

logistic-density-kernelclj

(logistic-density-kernel x)
source

multclj

(mult k1)
(mult k1 k2)
(mult k1 k2 k3)
(mult k1 k2 k3 & r)

Kernel wrapper. Multiply two or more kernels.

Kernel wrapper. Multiply two or more kernels.
sourceraw docstring

quartic-density-kernelclj

(quartic-density-kernel x)
source

rbfcljmultimethod

RBF kernel creator. RBF is double->double function.

Parameters:

All kernels accept scale parameter (as last parameter).

Following kernels also accept beta: :multiquadratic, :inverse-multiquadratic, :truncated-power, :radial-powers and :thin-plate.

RBF kernel creator. RBF is double->double function.

Parameters:

All kernels accept `scale` parameter (as last parameter).

Following kernels also accept `beta`: `:multiquadratic`, `:inverse-multiquadratic`, `:truncated-power`, `:radial-powers` and `:thin-plate`.
sourceraw docstring

rbf->kernelclj

(rbf->kernel rbf-kernel)
(rbf->kernel rbf-kernel distance)

Treat RBF kernel as vector kernel using distance function (default [[euclidean]].

Treat RBF kernel as vector kernel using distance function (default [[euclidean]].
sourceraw docstring

rbf-listclj

source

scaleclj

(scale k scale)

Kernel wrapper. Scale kernel result.

Kernel wrapper. Scale kernel result.
sourceraw docstring

sigmoid-density-kernelclj

(sigmoid-density-kernel x)
source

silverman-density-kernelclj

(silverman-density-kernel x)
source

smile-mercerclj

(smile-mercer k)

Create Smile Mercer Kernel object

Used to pass to Smile constructors/functions.

Create Smile Mercer Kernel object

Used to pass to Smile constructors/functions.
sourceraw docstring

smile-rbfclj

(smile-rbf rbf-fn)

Create RBF Smile object.

Used to pass to Smile constructors/functions.

Create RBF Smile object.

Used to pass to Smile constructors/functions.
sourceraw docstring

triangular-density-kernelclj

(triangular-density-kernel x)
source

tricube-density-kernelclj

(tricube-density-kernel x)
source

triweight-density-kernelclj

(triweight-density-kernel x)
source

uniform-density-kernelclj

(uniform-density-kernel x)
source

waddclj

(wadd kernels)
(wadd weights kernels)

Kernel wrapper. Add kernels (weighted).

Kernel wrapper. Add kernels (weighted).
sourceraw docstring

wigner-density-kernelclj

(wigner-density-kernel x)
source

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

× close