kernel {lgpr}R Documentation

Compute a kernel matrix (covariance matrix)

Description

These have STAN_kernel_* counterparts. These R versions are provided for reference and are not optimized for speed. These are used when generating simulated data, and not during model inference.

Usage

kernel_eq(x1, x2, alpha = 1, ell)

kernel_ns(x1, x2, alpha = 1, ell, a)

kernel_zerosum(x1, x2, M)

kernel_bin(x1, x2, pos_class = 0)

kernel_cat(x1, x2)

kernel_varmask(x1, x2, a, vm_params)

kernel_beta(beta, idx1_expand, idx2_expand)

Arguments

x1

vector of length n

x2

vector of length m

alpha

marginal std (default = 1)

ell

lengthscale

a

steepness of the warping function rise

M

number of categories

pos_class

binary (mask) kernel function has value one if both inputs have this value, other wise it is zero

vm_params

vector of two mask function parameters.

beta

a parameter vector (row vector) of length N_cases

idx1_expand

integer vector of length n

idx2_expand

integer vector of length m

Value

A matrix of size n x m.

Functions


[Package lgpr version 1.2.4 Index]