GPC: Class GPC.

Description Usage Arguments Details Value Examples

View source: R/GPC.R

Description

Class GPC defines a Gaussian Process Classifier. GPC(), GPC(X, Y, covarFun) creates a new GPC object used to predict labels for new input data.

Construct a new GPC object.

Usage

1
2
3
GPC(X, Y, covarFun = NA)

GPC(X, Y, covarFun = NA)

Arguments

X

Matrix of input data; sample in rows.

Y

Logical vector of binary labels.

covarFun

Covariance function to use. Must be of class CovarFun. If omitted, the squared exponential covariance function is used by default.

Details

Covariance function hyperparameters are selected automatically through maximum likelihood. This class is implemented using the Expectation Propagation approximation detailed in (Gaussian Processes for Machine Learning, Rasmussen and Williams, 2006).

Value

S4 object of class GPC, where covarance function hyperparameters have been set to their maximum likelihood estimates.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# Create synthetic dataset
X <- matrix(rnorm(60), ncol=2)
Y <- rowSums(X^2) < 1

# New GPX Object with default squared exponential covariance function.
gpc <- GPC(X, Y)

# Predict labels for new data
Xst <- matrix(rnorm(60), ncol=2)
Yst <- predict(gpc, Xst)

JimSkinner/gpclassifier documentation built on May 7, 2019, 10:52 a.m.