liblinear bindings for Go

Overview

Introduction

Report card GoDoc

golinear is a package for training and using linear classifiers in the Go programming language (golang).

Installation

To use this package, you need the liblinear library. On Mac OS X, you can install this library with Homebrew:

brew install liblinear

Ubuntu and Debian provide packages for liblinear. However, at the time of writing (July 2, 2014), these were serverly outdated. This package requires version 1.9 or later.

This latest API-stable version (v1) can be installed with the go command:

go get gopkg.in/danieldk/golinear.v1

or included in your source code:

import "gopkg.in/danieldk/golinear.v1"

The package documentation is available at: http://godoc.org/gopkg.in/danieldk/golinear.v1

OpenMP

If you wish to use liblinear with OpenMP support for multicore processing, please use this command to install the package:

CGO_LDFLAGS="-lgomp" CGO_CFLAGS="-DCV_OMP" go get github.com/danieldk/golinear

Plans

  1. Port classification to Go.
  2. Port training to Go.

We will take a pragmatic approach to porting code to Go: if the performance penalty is minor, ported code will flow to the main branch. Otherwise, we will keep it around until the performance is good enough.

Examples

Examples for using golinear can be found at:

https://github.com/danieldk/golinear-examples

You might also like...
naive go bindings to the CPython C-API

go-python Naive go bindings towards the C-API of CPython-2. this package provides a go package named "python" under which most of the PyXYZ functions

Go bindings for Lua C API - in progress

Go Bindings for the lua C API Simplest way to install: # go get github.com/aarzilli/golua/lua You can then try to run the examples: $ cd golua/_examp

Go bindings for libmagic to detect MIME types

magicmime magicmime is a Go package which allows you to discover a file's mimetype by looking for magic numbers in its content. It could be used as a

Go bindings for raylib, a simple and easy-to-use library to enjoy videogames programming.
Go bindings for raylib, a simple and easy-to-use library to enjoy videogames programming.

raylib-go Golang bindings for raylib, a simple and easy-to-use library to enjoy videogames programming. Requirements Ubuntu X11 apt-get install libgl1

Go bindings for the Cartographic Projections Library PROJ.4

The Go package proj provides a limited interface to the Cartographic Projections Library PROJ. For PROJ version 5 and beyond, see also: https://github

Go bindings for GLFW 3

GLFW 3.3 for Go Installation GLFW C library source is included and built automatically as part of the Go package. But you need to make sure you have d

Go bindings for GLFW 3

GLFW 3.3 for Go Installation GLFW C library source is included and built automatically as part of the Go package. But you need to make sure you have d

Go bindings for OpenGL (generated via glow)

gl This repository holds Go bindings to various OpenGL versions. They are auto-generated using Glow. Features: Go functions that mirror the C specific

Go bindings to OpenGL Utility Library

GLU This package offers minimal bindings for GLU functions. Usage go get github.com/go-gl-legacy/glu License Copyright 2012 The go-gl Authors. All ri

Go bindings for audio capture and playback with ALSA and libasound

Go ALSA bindings These bindings allow capture and playback of audio via ALSA using the alsa-lib library. Installation go get github.com/cocoonlife/goa

naive go bindings to GnuPlot
naive go bindings to GnuPlot

go-gnuplot Simple-minded functions to work with gnuplot. go-gnuplot runs gnuplot as a subprocess and pushes commands via the STDIN of that subprocess.

go-gtk3 - GTK3 BINDINGS FOR GO

go-gtk3 - GTK3 BINDINGS FOR GO THIS IS: Hopefully GTK3 Bindings using gobject binding for Go. Goal is to have fairly complete gtk3 widgets with pango

Experimental OpenAL bindings for Go.

Experimental OpenAL bindings for Go. ==================================== Everything is evolving quickly and nothing is totally done. If you want to

Go bindings for OpenCV / 2.x API in gocv / 1.x API in opencv

Go OpenCV binding A Golang binding for OpenCV. OpenCV 1.x C API bindings through CGO, and OpenCV 2+ C++ API (GoCV) through SWIG. Disclaimer This is a

Go bindings for GStreamer (retired: currently I don't use/develop this package)

Retired. I don't use/develop this package anymore. Go bindings for GStreamer at a very early stage of maturity. This package is based on GLib bindings

Go bindings for libVLC and high-level media player interface
Go bindings for libVLC and high-level media player interface

Go bindings for libVLC 2.X/3.X/4.X and high-level media player interface. The package can be useful for adding multimedia capabilities to applications

Go bindings for OpenCV1.1 (Dev/Zero Dependencies).
Go bindings for OpenCV1.1 (Dev/Zero Dependencies).

Go语言QQ群: 102319854, 1055927514 凹语言(凹读音“Wa”)(The Wa Programming Language): https://github.com/wa-lang/wa Go bindings for OpenCV1.1 PkgDoc: http://godoc

Cgo bindings to PulseAudio's Simple API, for easily playing or capturing raw audio.

pulse-simple Cgo bindings to PulseAudio's Simple API, for easily playing or capturing raw audio. The full Simple API is supported, including channel m

Vulkan API bindings for Go programming language
Vulkan API bindings for Go programming language

Golang Bindings for Vulkan API Package vulkan provides Go bindings for Vulkan — a low-overhead, cross-platform 3D graphics and compute API. Updated Oc

Comments
  • Unable to build with go

    Unable to build with go

    I have installed the liblinear-dev in Ubuntu. Next when I install your package using go get I get the following issue.

    Please have a look

    go get github.com/danieldk/golinear
    # github.com/danieldk/golinear
    38: error: 'L2R_L2LOSS_SVR' undeclared (first use in this function)
    38: error: 'L2R_L2LOSS_SVR_DUAL' undeclared (first use in this function)
    38: error: 'L2R_L1LOSS_SVR_DUAL' undeclared (first use in this function)
    
    opened by wiless 4
  • linear.h missing

    linear.h missing

    Thanks for the library, was going to try it out, but i get the following error:

    On OSX 10.6

    In file included from malloc.go:5:
    wrap.h:4:20: error: linear.h: No such file or directory
    

    On Linux

    # github.com/danieldk/golinear
    wrap.h:4:20: fatal error: linear.h: No such file or directory
    compilation terminated.
    

    Is this a standard C lib?

    invalid 
    opened by mish15 4
  • OpenMP support

    OpenMP support

    Hi,

    These commits enable the use of all the available CPU cores.

    Useful when you have this package installed for example: https://aur.archlinux.org/packages/liblinear-multicore/

    Or when liblinear is installed from the sources at: https://www.csie.ntu.edu.tw/~cjlin/libsvmtools/multicore-liblinear/

    opened by efournival 2
  • Attempt to fix memory leak, add some functionality

    Attempt to fix memory leak, add some functionality

    Hey,

    I noticed that when I iteratively trained SVMs, I was copping a big memory leak. I think it was resulting from the Nodes allocated within problem.Add(). It seems to have fixed the problem.

    I had to alter the ldflags argument to make it compile on my systems (Fedora Core and Red Hat Enterprise). I also wrapped the malloc calls in a function which invokes the garbage collector, re-tries, and then panics if it still fails.

    Jack

    opened by jvlmdr 1
Owner
Daniël de Kok
I love to discover patterns in data using Natural Language Processing and Machine Learning.
Daniël de Kok
Go bindings for the PortAudio audio I/O library

portaudio This package provides an interface to the PortAudio audio I/O library. See the package documentation for details. To build this package you

Gordon Klaus 530 Sep 18, 2022
Go bindings for libportmidi

portmidi Want to output to an MIDI device or listen your MIDI device as an input? This package contains Go bindings for PortMidi. libportmidi (v. 217)

Jaana Dogan 272 Sep 19, 2022
Golang bindings for the Telegram Bot API

Golang bindings for the Telegram Bot API All methods are fairly self explanatory, and reading the godoc page should explain everything. If something i

null 4k Sep 22, 2022
OpenSSL bindings for Go

OpenSSL bindings for Go Please see http://godoc.org/github.com/spacemonkeygo/openssl for more info License Copyright (C) 2017. See AUTHORS. Licensed u

Space Monkey Go 438 Sep 13, 2022
Golang bindings for libxlsxwriter for writing XLSX files

goxlsxwriter provides Go bindings for the libxlsxwriter C library. Install goxlsxwriter requires the libxslxwriter library to be installe

Frank Terragna 18 Jun 27, 2022
Go bindings for ForestDB

goforestdb Go bindings for ForestDB Building Obtain and build forestdb: https://github.com/couchbaselabs/forestdb (run make install to install the lib

null 32 Apr 5, 2022
Go bindings for GLib type system.

Go bindings for GLib type system. This package is designed for building bindings to C libraries based on GLib type system (like GTK, GStreamer, and ot

Michał Derkacz 24 Aug 13, 2019
Source code editor written in Go using go-gtk bindings. It aims to handle navigation effectively among large number of files.

tabby Source code editor written in Go using go-gtk bindings. It aims to handle navigation effectively among large number of files. screenshot: depend

Mikhail Trushnikov 49 Dec 30, 2021
Duktape JavaScript engine bindings for Go

Duktape bindings for Go(Golang) Duktape is a thin, embeddable javascript engine. Most of the api is implemented. The exceptions are listed here. Usage

Oleg Lebedev 781 Sep 26, 2022
PHP bindings for the Go programming language (Golang)

PHP bindings for Go This package implements support for executing PHP scripts, exporting Go variables for use in PHP contexts, attaching Go method rec

Alex Palaistras 868 Sep 8, 2022