crf_options: Conditional Random Fields parameters

View source: R/modelling.R

crf_optionsR Documentation

Conditional Random Fields parameters

Description

Conditional Random Fields parameters

Usage

crf_options(
  method = c("lbfgs", "l2sgd", "averaged-perceptron", "passive-aggressive", "arow")
)

Arguments

method

character string with the type of training method. Either one of:

  • lbfgs: L-BFGS with L1/L2 regularization

  • l2sgd: SGD with L2-regularization

  • averaged-perceptron: Averaged Perceptron

  • passive-aggressive: Passive Aggressive

  • arow: Adaptive Regularization of Weights (AROW)

Value

a list with elements

  • method: The training method

  • type: The type of graphical model which is always set crf1d: Linear-chain (first-order Markov) CRF

  • params: A data.frame with fields arg, arg_default and description indicating the possible hyperparameters of the algorithm, the default values and the description

  • default: A list of default values which can be used to pass on to the options argument of crf

Examples

# L-BFGS with L1/L2 regularization
opts <- crf_options("lbfgs")
str(opts)

# SGD with L2-regularization
crf_options("l2sgd")

# Averaged Perceptron
crf_options("averaged-perceptron")

# Passive Aggressive
crf_options("passive-aggressive")

# Adaptive Regularization of Weights (AROW)
crf_options("arow")

crfsuite documentation built on Sept. 17, 2023, 1:06 a.m.