SVM Apply Function

This function applies a Support Vector Machine (SVM) model previously trained by a SVM procedure to a feature vector, predicting a label or returning a regression result. It is a wrapper around the popular open-source LIBSVM library. For more information about LIBSVM:


A new function of type svm named <id> can be created as follows:

mldb.put("/v1/functions/"+<id>, {
    "type": "svm",
    "params": {
        "modelFileUrl": <Url>

with the following key-value definitions for params:

Field, Type, DefaultDescription


URL of the model file (with extension '.svm') to load. This file is created by a procedure of type 'svm.train'.

Input and Output Values

The SVM function of this type has a single input value called embedding which is a feature vector corresponding to the feature vector that was used for training the SVM model, without the label.

The function outputs a single value output which depend on the type of SVM trained:

See also