Description Usage Arguments Value Examples
View source: R/prediction.Regression.R
This makes prediction for multiple kernel regression
1 | prediction.Regression(model, ktest, outcome)
|
model |
MKL model |
ktest |
Gramm matrix of training data and test data |
outcome |
Outcome for the training data |
yhat Predicted value for each test point
predicted Sign of yhat, which is the final predicted outcome
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.