Safe Haskell | None |
---|---|
Language | Haskell98 |
Synopsis
- data CRF a b = CRF {}
- size :: CRF a b -> Int
- prune :: Double -> CRF a b -> CRF a b
- train :: (Ord a, Ord b) => Int -> FeatSel () -> SgdArgs -> Bool -> IO [SentL a b] -> IO [SentL a b] -> IO (CRF a b)
- tag :: (Ord a, Ord b) => CRF a b -> Sent a b -> DAG () (Maybe [b])
- marginals :: (Ord a, Ord b) => CRF a b -> Sent a b -> SentL a b
- data ProbType
- probs :: (Ord a, Ord b) => ProbType -> CRF a b -> Sent a b -> SentL a b
- module Data.CRF.Chain2.Tiers.DAG.Dataset.External
- type FeatSel a = DAG a (X, Y) -> [Feat]
- selectHidden :: FeatSel a
- selectPresent :: FeatSel a
CRF
CRF model data.
prune :: Double -> CRF a b -> CRF a b Source #
Discard model features with absolute values (in log-domain) lower than the given threshold.
Training
:: (Ord a, Ord b) | |
=> Int | Number of layers (tiers) |
-> FeatSel () | Feature selection |
-> SgdArgs | SGD parameters |
-> Bool | Store dataset on a disk |
-> IO [SentL a b] | Training data |
-> IO [SentL a b] | Evaluation data |
-> IO (CRF a b) | Resulting model |
Train the CRF using the stochastic gradient descent method.
Tagging
tag :: (Ord a, Ord b) => CRF a b -> Sent a b -> DAG () (Maybe [b]) Source #
Find the most probable labeled path.
marginals :: (Ord a, Ord b) => CRF a b -> Sent a b -> SentL a b Source #
Tag labels with marginal probabilities.
probs :: (Ord a, Ord b) => ProbType -> CRF a b -> Sent a b -> SentL a b Source #
Tag labels with marginal probabilities.
Dataset
Feature selection
selectHidden :: FeatSel a Source #
The hiddenFeats
adapted to fit feature selection specs.
selectPresent :: FeatSel a Source #
The presentFeats
adapted to fit feature selection specs.