kernlab (version 0.8-2)

predict.gausspr: predict method for Gaussian Processes object

Description

Prediction of test data using Gaussian Processes

Usage

## S3 method for class '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

  • responsepredicted classes (the classes with majority vote) or the response value in regression.
  • probabilitiesmatrix of class probabilities (one column for each class and one row for each input).

References

  • C. K. I. Williams and D. Barber Bayesian classification with Gaussian processes. IEEE Transactions on Pattern Analysis and Machine Intelligence, 20(12):1342-1351, 1998 http://www.dai.ed.ac.uk/homes/ckiw/postscript/pami_final.ps.gz
  • T.F. Wu, C.J. Lin, R.C. Weng. Probability estimates for Multi-class Classification by Pairwise Coupling http://www.csie.ntu.edu.tw/~cjlin/papers/svmprob/svmprob.pdf

Examples

Run this code
## 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

Run the code above in your browser using DataCamp Workspace