crf-chain1-0.2.3: First-order, linear-chain conditional random fields

Data.CRF.Chain1.Train

Synopsis

# Documentation

data CRF a b Source #

A conditional random field model with additional codec used for data encoding.

Constructors

 CRF Fieldscodec :: Codec a bThe codec is used to transform data into internal representation, where each observation and each label is represented by a unique integer number.model :: ModelThe actual model, which is a map from Features to potentials.
Instances
 (Ord a, Ord b, Binary a, Binary b) => Binary (CRF a b) Source # Instance detailsDefined in Data.CRF.Chain1.Train Methodsput :: CRF a b -> Put #get :: Get (CRF a b) #putList :: [CRF a b] -> Put #

Arguments

 :: (Ord a, Ord b) => SgdArgs Args for SGD -> IO [SentL a b] Training data IO action -> Maybe (b, IO [SentL a b]) Default label and evalation data -> ([(Xs, Ys)] -> [Feature]) Feature selection -> IO (CRF a b) Resulting model

Train the CRF using the stochastic gradient descent method. The resulting model will contain features extracted with the user supplied extraction function. You can use the functions provided by the Data.CRF.Chain1.Feature.Present and Data.CRF.Chain1.Feature.Hidden modules for this purpose. When the evaluation data IO action is Just, the iterative training process will notify the user about the current accuracy on the evaluation part every full iteration over the training part.