prediction.Regression: Prediction from MKL model

Description Usage Arguments Value Examples

View source: R/prediction.Regression.R

Description

This makes prediction for multiple kernel regression

Usage

1
prediction.Regression(model, ktest, outcome)

Arguments

model

MKL model

ktest

Gramm matrix of training data and test data

outcome

Outcome for the training data

Value

yhat Predicted value for each test point

predicted Sign of yhat, which is the final predicted outcome

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
## Not run: 
library(kernlab)
x=as.matrix(10*runif(200),ncol=1)
y=x*sin(x)+rnorm(200)
plot(x,y)


model=SEMKL.regression(k=K$K.train, outcome = y[1:150], epsilon = 0.01, penalty=100)
pred=prediction.Regression(model=model, ktest=K$K.test,outcome=y)
plot(y[151:200],pred)
abline(a=0,b=1)
plot(x[151:200],y[151:200])
points(x[151:200],pred,col='red')

## End(Not run)

cwilso6/RMKL documentation built on May 18, 2021, 9:58 a.m.