crf_caretmethod {crfsuite} | R Documentation |
Functionality allowing to tune a crfsuite model using caret
Description
The object crf_caretmethod
contains functionality to tune a crf model using caret.
Each list elment of crf_caretmethod
is a list of functions
which can be passed on to the method
argument of caret::train
to tune the hyperparameters of the crfsuite model.
Usage
crf_caretmethod
Format
see details
Details
If you want to tune the hyperparameters of a crfsuite model
(see crf_options
and the options
argument of crf
), you can use the caret
package.
In order to facilitate this tuning, an object called crf_caretmethod
has been made available.
The object crf_caretmethod
is a list with 6 elements, where each of these 6 elements can be used in
tuning the CRF hyperparemeters by passing it on to the method
argument of the train
function of the caret
package.
The list has elements 'default', 'lbfgs', 'l2sgd', 'averaged_perceptron', 'passive_aggressive' and 'arow'.
Each list element corresponds to arguments that you need to tune for each method
as used in crf
.
For crf_caretmethod
lbfgs: Tuning across all hyperparameters for method lbfgs: L-BFGS with L1/L2 regularization
l2sgd: Tuning across all hyperparameters for method l2sgd: SGD with L2-regularization
averaged_perceptron: Tuning across all hyperparameters for method averaged-perceptron: Averaged Perceptron
passive_aggressive: Tuning across all hyperparameters for method passive-aggressive: Passive Aggressive
arow: Tuning across all hyperparameters for method arow: Adaptive Regularization of Weights (AROW)
default: Tune over the hyperparameters feature.minfreq, feature.possible_states, feature.possible_transitions, max_iterations. While tuning these, it uses the default hyperparameters for each method. This tuning allows you to compare the 5 methods.
For details on the hyperparameter definitions: see crf_options