package orsvm_e1071
-
orsvm_e1071
Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
train ~cost Dense kernel data_fn labels_fn
will train a binary SVM classifier with the given RBF or Linear kernel with parameter cost
on the data in data_fn
with labels in labels_fn
. data_fn
is a dense numerical matrix dumped in a tab-separated text file without any format header. Rows are observations, columns are features. labels_fn
is a vector of tab-separated "1" or "-1" integer labels in a text file, without any format header. Column i
in labels_fn
is the corresponding label of line i
in data_fn
.
predict Dense train_result to_predict_data_fn
will run the previously trained SVM model on the new data stored in to_predict_data_fn
. to_predict_data_fn
must follow the same format than data_fn
used while training. On success, a filename is returned. This text file contains the predicted decision values, one per line of to_predict_data_fn
.
val read_predictions : ?debug:bool -> Result.t -> float list
read_predictions result
will decode predicted decision values in result
, or crash if the previous call to predict
was not successful. Upon success and if not debug
, the file containing the predicted decision values is removed.