Penelope v0.1.1 Penelope.NIF

NIF wrapper module

for blas, see http://www.netlib.org/blas/ for libsvm, see https://github.com/cjlin1/libsvm

Link to this section Summary

Functions

z = ax + y

module initialization callback

compiles svm model parameters into a model resource

extracts svm model parameters from a model resource

predicts a class from a feature vector

predicts an ordered list of class probabilities from a feature vector

trains an svm model using libsvm

Link to this section Functions

Link to this function blas_saxpy(a, x, y)
blas_saxpy(a :: float(), x :: Penelope.ML.Vector.t(), y :: Penelope.ML.Vector.t()) :: Penelope.ML.Vector.t()

z = ax + y

Link to this function blas_sscal(a, x)
blas_sscal(a :: float(), x :: Penelope.ML.Vector.t()) :: Penelope.ML.Vector.t()

y = ax

Link to this function init()
init() :: :ok

module initialization callback

Link to this function svm_compile(params)
svm_compile(params :: map()) :: reference()

compiles svm model parameters into a model resource

Link to this function svm_export(model)
svm_export(model :: reference()) :: map()

extracts svm model parameters from a model resource

Link to this function svm_predict_class(model, x)
svm_predict_class(model :: reference(), x :: Penelope.ML.Vector.t()) :: integer()

predicts a class from a feature vector

Link to this function svm_predict_probability(model, x)
svm_predict_probability(model :: reference(), x :: Penelope.ML.Vector.t()) :: [float()]

predicts an ordered list of class probabilities from a feature vector

Link to this function svm_train(x, y, params)
svm_train(x :: [Penelope.ML.Vector.t()], y :: [integer()], params :: map()) :: reference()

trains an svm model using libsvm