Predicts the test data labels using a Kernel Discriminant Learning for Ordinal Regression fitted model

kdlorpredict(fittedmodel, trainData, testData)

Arguments

fittedmodel

fitted model of class kdlorModel obtained with kdlortrain(...)

trainData

Data used to previously train the model. Tags should not be provided in traindata.

testData

Test data without labels.

Value

A list of two elements containing the predicted labels for each instances and the projected values.

Examples

testdata<-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
testlabels<-testdata[,ncol(testdata)]
#> Error in eval(expr, envir, enclos): object 'testdata' not found
testdata<-testdata[,-ncol(testdata)]
#> Error in eval(expr, envir, enclos): object 'testdata' not found
pred<-kdlorpredict(myfit,traindata,testdata)
#> Error in typeof(fittedmodel): object 'myfit' not found