LibSVM

coremltools.converters.libsvm._libsvm_converter.convert(libsvm_model, feature_names, target, input_length, probability)

Convert a svm model to the protobuf spec.

This currently supports:
  • C-SVC

  • nu-SVC

  • Epsilon-SVR

  • nu-SVR

Parameters
model_path: libsvm_model

Libsvm representation of the model.

feature_names[str] | str

Names of each of the features.

target: str

Name of the predicted class column.

probability: str

Name of the class probability column. Only used for C-SVC and nu-SVC.

Returns
model_spec: An object of type Model_pb.

Protobuf representation of the model