Module Libsvm.Svm.Model

module Model: sig .. end

type t 
Type of a SVM model.
val get_svm_type : t ->
[ `C_SVC | `EPSILON_SVR | `NU_SVC | `NU_SVR | `ONE_CLASS ]
get_svm_type model
Returns the svm type that was used to train the given model.
val 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.
val get_labels : t -> int list
get_labels model
Raises Invalid_argument in the case of a regression or one-class model.
Returns the labels of a two or multi-class classification problem in a list.
val get_n_sv : t -> int
get_n_sv model
Returns the total number of support vectors.
val get_svr_probability : t -> float
get_svr_probability model
Raises Invalid_argument for non-regression models.
Returns a positive value for a regression model with probability information. In the case of no probability information, 0 is returned.
val save : t -> string -> unit
save model filename saves a model to the file filename.
val load : string -> t
load filename loads a model from the file filename.
Raises Failure if model could not be loaded.