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

Safe HaskellNone
LanguageHaskell98

Data.CRF.Chain2.Tiers.Model

Contents

Synopsis

Model

data Model Source

Internal model data.

Constructors

Model 

Fields

values :: Vector Double
 
featMap :: FeatMap
 

Instances

mkModel :: FeatSel -> [(Xs, Ys)] -> Model Source

Construct model from a dataset given a feature selection function.

fromSet :: Set Feat -> Model Source

Construct model from a feature set. All values will be set to 1 in log domain.

fromMap :: Map Feat LogFloat -> Model Source

Construct model from a (feature -> value) map.

toMap :: Model -> Map Feat LogFloat Source

Convert model to a (feature -> value) map.

Potential

phi :: Model -> Feat -> LogFloat Source

Potential assigned to the feature -- exponential of the corresonding parameter.

index :: Model -> Feat -> Maybe FeatIx Source

Index of a feature.

onWord :: Model -> Xs -> Int -> CbIx -> LogFloat Source

Observation potential on a given position and a given label (identified by index).

onTransition :: Model -> Xs -> Int -> CbIx -> CbIx -> CbIx -> LogFloat Source

Transition potential on a given position and a given labels (identified by indexes).