package libsvm

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Svm.ModelSource

Sourcetype t

Type of a SVM model.

Sourceval get_svm_type : t -> [ `C_SVC | `NU_SVC | `ONE_CLASS | `EPSILON_SVR | `NU_SVR ]

get_svm_type model

  • returns

    the svm type that was used to train the given model.

Sourceval get_n_classes : t -> int

get_n_classes model

  • returns

    the number of classes for a classification model or 2 for a regression or an one-class model.

Sourceval get_labels : t -> int list

get_labels model

  • returns

    the labels of a two or multi-class classification problem in a list.

Sourceval get_n_sv : t -> int

get_n_sv model

  • returns

    the total number of support vectors.

Sourceval get_svr_probability : t -> float

get_svr_probability model

  • returns

    a positive value for a regression model with probability information. In the case of no probability information, 0 is returned.

Sourceval save : t -> string -> unit

save model filename saves a model to the file filename.

Sourceval load : string -> t

load filename loads a model from the file filename.

  • raises Failure

    if model could not be loaded.

OCaml

Innovation. Community. Security.