converters.libsvm._libsvm_converter

Module Contents

Functions

_infer_min_num_features(model)
convert(libsvm_model,feature_names,target,input_length,probability) Convert a svm model to the protobuf spec.
_infer_min_num_features(model)
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
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.
model_spec: An object of type Model_pb.
Protobuf representation of the model