Learn R Programming

iprior (version 0.6.1)

kernel: Reproducing kernels for the I-prior package

Description

The three kernel functions used in this package are the Canonical kernel fnH2, Fractional Brownian Motion (FBM) kernel fnH3 (with a default Hurst coefficient of 0.5), and the Pearson kernel fnH1.

Usage

fnH1(x, y = NULL)
fnH2(x, y = NULL)
fnH3(x, y = NULL, gamma = 0.5)

Arguments

x, y
A vector, matrix or data frame. x and y must have similar dimensions.
gamma
The Hurst coefficient when using the FBM kernel.

Value

A matrix with class of either "Canonical", "FBM,gamma", or "Pearson" whose [i, j] entries are $h($y[i], x[j]$)$, with $h$ being the kernel function. The matrix has dimensions m by n according to the lengths of y and x which has lengtsh m and n respectively. When a single vector argument x is supplied, then y is taken to be equal to x, and a symmetric n by n matrix is returned.If x is a matrix or data frame with p columns, then the kernel matrix returned is fnH(x[, 1]) + ... + fnH(x[, p]).

Details

The Pearson kernel is used for nominal-type variables, and in R, factor-type objects are treated with the Pearson kernel automatically. The other two kernel types are for continuous variables, with the Canonical kernel used for "straight-line" effects and the FBM for smoothing effects. The smoothness is controlled somewhat by the Hurst coefficient.

See Also

The Wikipedia page on the Fractional Brownian Motion.