Struct crfsuite::Trainer[][src]

pub struct Trainer { /* fields omitted */ }

The trainer It maintains a data set for training, and provides an interface to various graphical models and training algorithms.

Methods

impl Trainer
[src]

Construct a trainer

Remove all instances in the data set

Append an instance (item/label sequence) to the data set.

Parameters

xseq: a sequence of item features, The item sequence of the instance.

yseq: a sequence of strings, The label sequence of the instance.

group: The group number of the instance. Group numbers are used to select subset of data for heldout evaluation.

Initialize the training algorithm.

Run the training algorithm.

This function starts the training algorithm with the data set given by append() function.

Parameters

model: The filename to which the trained model is stored

holdout: The group number of holdout evaluation. the instances with this group number will not be used for training, but for holdout evaluation. -1 meaning "use all instances for training".

Obtain the list of parameters.

This function returns the list of parameter names available for the graphical model and training algorithm specified by select() function.

Set a training parameter.

This function sets a parameter value for the graphical model and training algorithm specified by select() function.

Get the value of a training parameter.

This function gets a parameter value for the graphical model and training algorithm specified by select() function.

Get the description of a training parameter.

This function obtains the help message for the parameter specified by the name. The graphical model and training algorithm must be selected by select() function before calling this function.

Trait Implementations

impl Debug for Trainer
[src]

Formats the value using the given formatter. Read more

impl Default for Trainer
[src]

Returns the "default value" for a type. Read more

impl Drop for Trainer
[src]

Executes the destructor for this type. Read more

Auto Trait Implementations

impl !Send for Trainer

impl !Sync for Trainer