Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

predict.gausspr

predict method for Gaussian Processes object


Description

Prediction of test data using Gaussian Processes

Usage

## S4 method for signature 'gausspr'
predict(object, newdata, type = "response", coupler = "minpair")

Arguments

object

an S4 object of class gausspr created by the gausspr function

newdata

a data frame or matrix containing new data

type

one of response, probabilities indicating the type of output: predicted values or matrix of class probabilities

coupler

Coupling method used in the multiclass case, can be one of minpair or pkpd (see reference for more details).

Value

response

predicted classes (the classes with majority vote) or the response value in regression.

probabilities

matrix of class probabilities (one column for each class and one row for each input).

Author(s)

References

Examples

## example using the promotergene data set
data(promotergene)

## create test and training set
ind <- sample(1:dim(promotergene)[1],20)
genetrain <- promotergene[-ind, ]
genetest <- promotergene[ind, ]

## train a support vector machine
gene <- gausspr(Class~.,data=genetrain,kernel="rbfdot",
                kpar=list(sigma=0.015))
gene

## predict gene type probabilities on the test set
genetype <- predict(gene,genetest,type="probabilities")
genetype

kernlab

Kernel-Based Machine Learning Lab

v0.9-29
GPL-2
Authors
Alexandros Karatzoglou [aut, cre], Alex Smola [aut], Kurt Hornik [aut], National ICT Australia (NICTA) [cph], Michael A. Maniscalco [ctb, cph], Choon Hui Teo [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.