ReadLIBSVM.jl

Parse LIBSVM format data in Julia
Author jeremiedb
Popularity
0 Stars
Updated Last
1 Year Ago
Started In
September 2023

ReadLIBSVM.jl

Documentation CI Status

ReadLIBSVM.jl is Julia package exporting read_libsvm function to parse data stored in the LIBSVM format.

Installation

Latest:

julia> Pkg.add(url="https://github.com/jeremiedb/ReadLIBSVM.jl")

From General Registry:

julia> Pkg.add("ReadLIBSVM")

Usage

Two methods are supported by read_libsvm:

  1. A path String to the file to be parsed
  2. A Vector{UInt8} containing the raw binary data (as returned by functions like read or returned from an API like AWS S3)
path = download("https://www.csie.ntu.edu.tw/~cjlin/libsvmtools/datasets/multiclass/wine.scale")
data = read_libsvm(path)

For datasets containing a query id, use the has_query kwarg:

read_libsvm(path; has_query=true)