rvbm {rpud}R Documentation

GPU Accelerated Variational Bayesian Multiclass Probit Regression

Description

The rvbm method trains a Bayesian classification model with Gaussian process priors. It is based on the variational sparse approximation technique used by Girolami and Rogers, as well as the vbmp package implemented by Lama and Girolami.

In the non-free rpudplus add-on, the rvbm method is implemented in NVIDIA CUDA, and assumes necessary double precision CUDA hardware support.

While there is no GPU-acceleration in the free rpud package, it includes optimized R code nonetheless.

Usage

## Default S3 method:
rvbm(X, t.class, X.TEST, t.class.TEST, 
        theta = rep(1, ncol(X)), control = list())

Arguments

X

Feature matrix for the model to fit.

t.class

Response vector for the feature matrix.

X.TEST

Out-of-sample test matrix for prediction.

t.class.TEST

Out-of-sample response values.

theta

Covariance parameters for each feature dimension.

control

A list of control parameters including the following:

  • InfoLevel: Trace level

  • sFILE.TRACE: Path of trace file

  • bThetaEstimate: Enable covariance parameter estimate

  • sKernelType: Gaussian process kernel, default is gaussian:

    • linear: u'*v

    • polynomial: (u'*v + coef0)^degree

    • cauchy: (1+|u-v|^2)^(-degree)

    • gaussian: exp(-|u-v|^2)

    • laplacian: exp(-|u-v|)

    • sigmoid: tanh(u'*v + coef0)

  • kDegree: coef0 parameter for polynomial and cauchy kernels

  • kCoef0: degree parameter for polynomial and sigmoid kernels, usually 0 or 1

  • maxIts: Maximum number of EM steps allowed (default 50).

  • Thresh: Convergence threshold on marginal likelihood lowerbound (default 1e-4).

  • method: Numerical integration method:

    • quadrature: Gaussian quadrature (default)

    • classic: Naive Monte Carlo

  • nNodesQuad: Number of quadrature nodes (default 49).

  • nSampsTG: Number of number of truncated Gaussian samples (default 1000).

  • nSampsIS: Importance sampler population (default 1000).

  • nSmallNo: Numerical underflow tolerance (default 1e-10).

  • parGammaTau: Location of Gamma prior over covariance parameters (default 1e-6).

  • parGammaSigma: Scale of Gamma prior over covariance parameters (default 1e-6).

  • bMonitor: TRUE to collect monitor convergence diagnostics (default FALSE).

  • bPlotFitting: TRUE to plot test performance results at each iteration (default FALSE).

  • bInitM: Optionally initializes latent Gaussian process random variables. Set as TRUE to exactly match results from vbmp (default FALSE).

Details

Sharing a single covariance function across all classes.

Value

An S3 object of class "rvbm" with the following components:

Kc

Number of response categories

Ptest

Matrix of predicted posterior probability

X

Feature matrix of the Gaussian process model

cholPHI

Upper triangular Cholesky factor of the symmetric kernel matrix

Y

Matrix of auxiliary variables

M

Matrix of latent Gaussian process random variables

THETA

covariance kernel hyperparameters

sKernelType

Kernel type of the Gaussian process model

testErr

Percentage of posterior prediction error.

PL

Predictive log likelihood during each model fitting iteration.

lowerBound

Lower bound estimates of marginal likelihood during each model fitting iteration.

Author(s)

Chi Yau (based on the vbmp R doc by Lama and Girolami)
chi.yau@r-tutor.com

References

See Also

predict.rvbm plot.rvbm rpusvm vbmp

Examples

## Not run: 
library(rpud)

x <- rvbm.sample.train$X
y <- rvbm.sample.train$t.class
model.rvbm <- rvbm( 
    x, y, x, y,
    theta = rep(1, ncol(x)), 
    control = list(
            sKernelType="gaussian", 
            bThetaEstimate=TRUE, 
            bMonitor=TRUE,
            maxIts=12,
            InfoLevel=1) 
)

summary(model.rvbm)


## End(Not run)

[Package rpud version 0.7.1 Index]