Predict over the new data instances using the trained models

svmopredict(models, test)

Arguments

models

A matrix of 1xN trained SVM models. Where N denotes the number of classes of the problem minus one.

test

Numeric test data without labels.

Value

A list containing the projected values per instance per class and the predicted values (the maximum probability for each data instance).

Examples

dattrain<-read.table("train_balance-scale.0", sep=" ")
#> Warning: cannot open file 'train_balance-scale.0': No such file or directory
#> Error in file(file, "rt"): cannot open the connection
modelstrain<-svmofit(dattrain[,-ncol(dattrain)],dattrain[,ncol(dattrain)],TRUE,1,1)
#> Error in svmofit(dattrain[, -ncol(dattrain)], dattrain[, ncol(dattrain)], TRUE, 1, 1): object 'dattrain' not found
dattest<-read.table("test_balance-scale.0", sep=" ")
#> Warning: cannot open file 'test_balance-scale.0': No such file or directory
#> Error in file(file, "rt"): cannot open the connection
predictions<-svmopredict(modelstrain,dattest[,-ncol(dattest)])
#> Error in svmopredict(modelstrain, dattest[, -ncol(dattest)]): object 'dattest' not found