predictSVM: Do prediction with a trained SVM on given data.

Description Usage Arguments Value Note

Description

This is the main routine for predictions. If needed, it will add dummy labels to the data given and then call testSVM.

Usage

1
2
3
4
predictSVM(method = NULL, testDataFile = NULL, testDataX = NULL,
  testDataY = NULL, model = NULL, modelFile = NULL,
  readPredictions = FALSE, predictionsFile = NULL, extraParameter = "",
  verbose = FALSE, ...)

Arguments

method

Name of the method/solver to use for testing. If NULL, a detectModelTypeFromFile will be called on the given model (or modelfile).

testDataFile

File to read training data from. Cannot be specified at the same time as testDataX and testDataY. See notes.

testDataX

Matrix to read training data from. Cannot be specified at the same time as testDataFile.

testDataY

Matrix to read training label from. Cannot be specified at the same time as testDataFile. Optional, see notes.

model

A trained SVM model. Cannot be specified at the same time as modelFile.

modelFile

Path of the model file. Cannot be specified at the same time as model.

readPredictions

Shall the predictions be read back into memory and added to the model?

predictionsFile

File to which the predictions will be written.

extraParameter

Extra parameters for solver in form of a string.

verbose

Be verbose?

...

Further parameters that will be passed to the createTestArguments function of the wrapper.

Value

An SVM Test Object, but with testError removed.

Note

testDataFile and testDataX,testDataY are exclusive parameters, i.e. you cannot specify both.

Make sure the modelFile is a character string and not a factor! Else you might obtain strange modelfile arguments.

Prediction can work without labels. If labels are not provided, dummy labels will be created, as testSVM expects labels Keep in mind that as the whole workflow is by command line, the unlabeled data on disk has to be first read, then labeled with a dummy label and then written back to disk. This will take some I/O time.


aydindemircioglu/SVMBridge documentation built on May 11, 2019, 4:13 p.m.