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

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

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

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

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

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

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

waddclj

(wadd kernels)
(wadd weights kernels)

Kernel wrapper. Add kernels (weighted).

Kernel wrapper. Add kernels (weighted).
sourceraw docstring

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

× close