crf-chain2-tiers-0.4.0: Second-order, tiered, constrained, linear conditional random fields

Safe HaskellNone
LanguageHaskell98

Data.CRF.Chain2.Tiers.Feature

Contents

Synopsis

Feature

data Feat Source #

Feature; every feature is associated to a layer with ln identifier.

Constructors

TFeat3

Second-order transition feature.

Fields

TFeat2

First-order transition feature.

Fields

TFeat1

Zero-order transition feature.

Fields

OFeat

Observation feature.

Fields

Instances
Eq Feat Source # 
Instance details

Defined in Data.CRF.Chain2.Tiers.Core

Methods

(==) :: Feat -> Feat -> Bool #

(/=) :: Feat -> Feat -> Bool #

Ord Feat Source # 
Instance details

Defined in Data.CRF.Chain2.Tiers.Core

Methods

compare :: Feat -> Feat -> Ordering #

(<) :: Feat -> Feat -> Bool #

(<=) :: Feat -> Feat -> Bool #

(>) :: Feat -> Feat -> Bool #

(>=) :: Feat -> Feat -> Bool #

max :: Feat -> Feat -> Feat #

min :: Feat -> Feat -> Feat #

Show Feat Source # 
Instance details

Defined in Data.CRF.Chain2.Tiers.Core

Methods

showsPrec :: Int -> Feat -> ShowS #

show :: Feat -> String #

showList :: [Feat] -> ShowS #

Binary Feat Source # 
Instance details

Defined in Data.CRF.Chain2.Tiers.Core

Methods

put :: Feat -> Put #

get :: Get Feat #

putList :: [Feat] -> Put #

Feature extraction

presentFeats :: Xs -> Ys -> [(Feat, LogFloat)] Source #

Features present in the dataset element together with corresponding occurence probabilities.

hiddenFeats :: Xs -> [Feat] Source #

Features hidden in the dataset element.

obFeatsOn :: Xs -> Int -> CbIx -> [Feat] Source #

Observation features on a given position and with respect to a given label (determined by index).

trFeatsOn :: Xs -> Int -> CbIx -> CbIx -> CbIx -> [Feat] Source #

Transition features on a given position and with respect to a given labels (determined by indexes).

Feature selection

type FeatSel = Xs -> Ys -> [Feat] Source #

A feature selection function type.

selectPresent :: FeatSel Source #

The presentFeats adapted to fit feature selection specs.

selectHidden :: FeatSel Source #

The hiddenFeats adapted to fit feature selection specs.