svmsm: Create a support vector machine (svm) adapter class for the...

Description Usage Format Details Fields Methods Examples

Description

svmsm is a svm adapter. It makes the use of the universal distirbution easier

Usage

1
# svm     <- svmsm$new()

Format

An R6Class generator object

Details

It construct a svm model adapter for the objects codesvm of the package e1071 and it inherits the class suurogate model sm. The inheritance of the class sm is required when one want to use the universal distribution

Fields

model_name

:"svm"

Methods

svmsm$new(x=NULL,y=NULL,parameters = NULL )

Creates a new svmsm object.

train()

train the surrogate model.

predict(newdata)

it predicts the new data.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
library(UP)
d      <- 2
X    	<- expand.grid(x1=s <- seq(0,1, length=5), x2=s)
Xtest	<- expand.grid(x1=seq(0,1,length=5), x2=seq(0,1,length=4))
Y      <- apply(X, 1, branin)
sm     <- svmsm$new()
sm$setDOE(X,Y)
sm$train() 
predictions <- sm$predict(Xtest)

   

malekbs/UP documentation built on May 14, 2019, 8:05 a.m.