package libsvm

Not available on OCaml 5.5
  1. Overview
  2. Docs
LIBSVM bindings for OCaml

Install

dune-project
 Dependency

Authors

Maintainers

Sources

0.10.0.tar.gz
md5=14d78e69ec457e1516902370cc8d1783
sha512=0b1e2ec5aff0c9f43504780b88cb1c18b42aa60ad6e00dacedf8ae44e7d5ec02305ee29fef837f190bfcdec8ff4c992a0bf6e67dc72875e4d20f8a9eba2672ef

Description

LIBSVM bindings for OCaml

LIBSVM-OCaml is an OCaml library with bindings to the LIBSVM library, which is a library for Support Vector Machines. Support Vector Machines are used to create supervised learning models for classification and regression problems in machine learning.

Added to opam-repository:

README

LIBSVM-OCaml - LIBSVM Bindings for OCaml


LIBSVM-OCaml is an OCaml library with bindings to the LIBSVM library, which is a library for Support Vector Machines. Support Vector Machines are used to create supervised learning models for classification and regression problems in machine learning.

Installation

From OPAM

$ opam install libsvm

From Source

    $ make
$ make install

Usage

Documentation

The API-documentation of this distribution can be built with make doc. It can also be found online.

Examples

This simple program solves the famous XOR-problem:

    :::ocaml
open Lacaml.D
open Libsvm

let () =
  let x = Mat.of_array
    [|
      [| 0.; 0. |];
      [| 0.; 1. |];
      [| 1.; 0. |];
      [| 1.; 1. |];
    |]
  in
  let targets = Vec.of_array [| 0.; 1.; 1.; 0. |] in
  let problem = Svm.Problem.create ~x ~y:targets in
  let model = Svm.train ~kernel:`RBF problem in
  let y = Svm.predict model ~x in
  for i = 1 to 4 do
    Printf.printf "(%1.0f, %1.0f) -> %1.0f\n" x.{i,1} x.{i,2} y.{i}
  done

For more examples please refer to the examples- or test-directory of this distribution.

Credits

  • Dominik Brugger wrote the initial release (0.1) of this library.

Contact Information

In case of bugs, feature requests and similar, please contact:

Dependencies (5)

  1. stdio
  2. ocaml >= "4.03.0" & < "5.0.0"
  3. lacaml >= "10.0.0"
  4. dune >= "1.10"
  5. base

Dev Dependencies (1)

  1. core_kernel with-test

Optional Dependencies

None

Used by

None

Conflicts

None

Build status

Results of building libsvm with each compiler on check.ci.ocaml.org, run of against opam-repository 8a77e58. All results for this package.

Each result links to its build log. To keep crawlers from overloading the site, build logs require a GitHub sign-in (see ocurrent/opam-health-check). On your first log, GitHub asks you to “Authorize opam-health-check”, the OCurrent app that runs these checks; it sees only your public profile, not your repositories. The sign-in lasts 30 days.

Version OCaml 4.11 OCaml 4.14 OCaml 5.2 OCaml 5.4 OCaml 5.5
0.10.0 (this version) good good n/a n/a n/a
  • good Package successfully built
  • partial One of the dependencies failed to build
  • bad Package failed to build
  • n/a Package is not available in this environment
  • internal Internal failure