calcError | R Documentation |
Calculate the averaged prediction error across tasks. For classification problem, the miss-classification rate is returned, and for regression problem, the mean square error(MSE) is returned.
calcError(m, newX = NULL, newY = NULL)
m |
A MTL model |
newX |
The feature matrices of new individuals |
newY |
The responses of new individuals |
The averaged prediction error
#create example data data<-Create_simulated_data(Regularization="L21", type="Regression") #train a model model<-MTL(data$X, data$Y, type="Regression", Regularization="L21", Lam1=0.1, Lam2=0, opts=list(init=0, tol=10^-6, maxIter=1500)) #calculate the training error calcError(model, newX=data$X, newY=data$Y) #calculate the test error calcError(model, newX=data$tX, newY=data$tY)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.