You are looking at historical revision 20754 of this page. It may differ significantly from its current revision.

libsvm

In progress.

An interface to the libsvm library for creating and using Support Vector Machines.

Constants

svm_type
C-SVC NU-SVC ONE-CLASS EPSILON-SVR NU-SVR
kernel_type
LINEAR POLY RBF SIGMOID PRECOMPUTED

Procedures

<procedure>(make-svm-parameter #!key (svm-type C-SVC)

           (kernel-type LINEAR)
           (degree 0)  ; for poly 
           (gamma 0.0) ;	for poly/rbf/sigmoid
           (coef0 0.0) ;	for poly/sigmoid
           ;; these are for training only 
           (cache-size 0.0) ; in MB 
           (eps 0.001) ;	stopping criteria
           (C 0.0) ;	for C_SVC, EPSILON_SVR and NU_SVR
           (nr-weight 0) ;	 for C_SVC
           (nu 0.0) ;	for NU_SVC, ONE_CLASS, and NU_SVR
           (p 0.0) ; for EPSILON_SVR
           (shrinking 0) ;	use the shrinking heuristics
           (probability 0) ; do probability estimates
           )</procedure>

Returns a pointer to an instance of svm_parameter.

[procedure] (svm-check-parameter problem parameter)

Returns #f if parameter set is ok, else a string giving description of error.

[procedure] (svm-check-probability-model model)
[procedure] (svm-cross-validation problem parameter number-folds targets)
[procedure] (svm-destroy-param parameter)
[procedure] (svm-free-and-destroy model-array)
[procedure] (svm-free-model-content model)
[procedure] (svm-get-labels model label-array)
[procedure] (svm-get-nr-class model)

Returns the number of classes for given model.

[procedure] (svm-get-svm-type model)

Returns the svm-type of the given model.

[procedure] (svm-get-svr-probability model)

Returns the SVR probability from given model.

[procedure] (svm-load-model filename)

Reads model definition from given filename and returns a pointer to the model.

[procedure] (svm-predict model svm-node)

Returns prediction of model for given svm-node.

<procedure>(svm-predict-probability model svm-node prob-estimates)</probability> Returns prediction of model for given svm-node, storing probability for each class in prob-estimates.

[procedure] (svm-predict-values model svm-node dec-values)

Returns prediction of model for given svm-node, storing class predictions in dec-values.

[procedure] (svm-save-model filename model)

Saves given model to a file called filename. Returns 0 if OK, else 1 if error.

[procedure] (svm-train problem parameter)

Returns a pointer an SVM model trained using given problem and parameter set.

Examples

Author

Peter Lane.

License

GPL version 3.0.

Requirements

Version History