Penelope v0.5.0 Penelope.NIF View Source

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

compiles crf model parameters into a model resource

extracts crf model parameters from a model resource

predicts a sequence from a sequence of features

trains a crf model using crfsuite

module initialization callback

compiles linear model parameters into a model resource

extracts linear 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 a inear model using liblinear

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

z = ax + y

y = ax

Link to this function crf_compile(params) View Source
crf_compile(params :: map()) :: reference()

compiles crf model parameters into a model resource

Link to this function crf_export(model) View Source
crf_export(model :: reference()) :: map()

extracts crf model parameters from a model resource

Link to this function crf_predict(model, x) View Source
crf_predict(model :: reference(), x :: [[String.t() | list() | map()]]) ::
  {[String.t()], float()}

predicts a sequence from a sequence of features

Link to this function crf_train(x, y, params) View Source
crf_train(
  x :: [[%{required(String.t()) => float()}]],
  y :: [[String.t()]],
  params :: map()
) :: reference()

trains a crf model using crfsuite

module initialization callback

Link to this function lin_compile(params) View Source
lin_compile(params :: map()) :: reference()

compiles linear model parameters into a model resource

Link to this function lin_export(model) View Source
lin_export(model :: reference()) :: map()

extracts linear model parameters from a model resource

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

predicts a class from a feature vector

Link to this function lin_predict_probability(model, x) View Source
lin_predict_probability(model :: reference(), x :: Penelope.ML.Vector.t()) :: [
  {integer(), float()}
]

predicts an ordered list of class probabilities from a feature vector

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

trains a inear model using liblinear

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

compiles svm model parameters into a model resource

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

extracts svm model parameters from a model resource

Link to this function svm_predict_class(model, x) View Source
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) View Source
svm_predict_probability(model :: reference(), x :: Penelope.ML.Vector.t()) :: [
  {integer(), float()}
]

predicts an ordered list of class probabilities from a feature vector

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

trains an svm model using libsvm