https://github.com/astupidbear/svmlightwriter.jl
Lightning-fast svmlight writer
https://github.com/astupidbear/svmlightwriter.jl
Last synced: 8 months ago
JSON representation
Lightning-fast svmlight writer
- Host: GitHub
- URL: https://github.com/astupidbear/svmlightwriter.jl
- Owner: AStupidBear
- License: mit
- Created: 2019-10-05T06:35:15.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2021-09-07T04:33:34.000Z (about 4 years ago)
- Last Synced: 2025-01-20T22:40:17.283Z (9 months ago)
- Language: Julia
- Size: 14.6 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Lightning-fast svmlight writer
[](https://github.com/AStupidBear/SVMLightWriter.jl/actions)
[](https://codecov.io/gh/AStupidBear/SVMLightWriter.jl)## Installation
```julia
using Pkg
pkg"add SVMLightWriter"
```## Usage
```julia
using SVMLightWriter, SparseArrays
x = [0 2; 3.1 4.2]
y = [1, -1]
x_sp = sparse(x)
```You can dump a dense or sparse array to an IOBuffer or a file
```julia
dump_svmlight_file(x, y, IOBuffer())
dump_svmlight_file(x_sp, y, IOBuffer())
dump_svmlight_file(x, y, "tmp.svmlight")
```