make.features {CRF}R Documentation

Make CRF features


Make the data structure of CRF features


make.features(crf, = 1, n.ef = 1)




The number of node features


The number of edge features


This function makes the data structure of features need for modeling and training CRF.

The parameters and n.ef specify the number of node and edge features, respectively.

The objects node.par and edge.par define the corresponding parameters used with each feature. node.par is a 3-dimensional arrays, and element node.par[n,i,f] is the index of parameter associated with the corresponding node potential node.pot[n,i] and node feature f. edge.par is a list of 3-dimensional arrays, and element edge.par[[e]][i,j,f] is the index of parameter associated with the corresponding edge potential edge.pot[[e]][i,j] and edge feature f. The value 0 is used to indicate the corresponding node or edge potential does not depend on that feature.

For detail of calculation of node and edge potentials from features and parameters, please see crf.update.


This function will directly modify the CRF and return the same CRF.

See Also

crf.update, make.par, make.crf

[Package CRF version 0.4-3 Index]