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

Safe HaskellNone

Data.CRF.Chain2.Tiers.Model

Contents

Synopsis

Model

data Model Source

Internal model data.

Constructors

Model 

Fields

values :: Vector Double
 
featMap :: FeatMap
 

Instances

Binary Model 

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

Construct model from a dataset given a feature selection function.

fromSet :: Set Feat -> ModelSource

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

fromMap :: Map Feat LogFloat -> ModelSource

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

toMap :: Model -> Map Feat LogFloatSource

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

Potential

phi :: Model -> Feat -> LogFloatSource

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

index :: Model -> Feat -> Maybe FeatIxSource

Index of a feature.

onWord :: Model -> Xs -> Int -> CbIx -> LogFloatSource

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

onTransition :: Model -> Xs -> Int -> CbIx -> CbIx -> CbIx -> LogFloatSource

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