gcrf

fun <T> gcrf(sequences: Array<Array<T>>, labels: Array<IntArray>, ntrees: Int = 100, maxDepth: Int = 20, maxNodes: Int = 100, nodeSize: Int = 5, shrinkage: Double = 1.0, features: (T) -> Tuple): CRFLabeler<T>(source)

Fits a first-order linear conditional random field labeler for generic observation objects. This is an alias for crf matching the Scala API convention.

Return

the CRF sequence labeler.

Parameters

sequences

the observation sequences.

labels

sequence labels.

ntrees

the number of trees/iterations.

maxDepth

the maximum depth of the tree.

maxNodes

the maximum number of leaf nodes in the tree.

nodeSize

the number of instances in a node below which the tree will not split.

shrinkage

the shrinkage parameter in (0, 1] controlling the learning rate.

features

the feature extraction function converting each observation item to a Tuple.

Type Parameters

T

the data type of observations.


fun <T> gcrf(sequences: Array<Array<T>>, labels: Array<IntArray>, options: CRF.Options, features: (T) -> Tuple): CRFLabeler<T>(source)

Fits a first-order linear conditional random field labeler for generic observation objects with given hyperparameters. This is an alias for crf matching the Scala API convention.

Return

the CRF sequence labeler.

Parameters

sequences

the observation sequences.

labels

sequence labels.

options

the CRF hyperparameters.

features

the feature extraction function converting each observation item to a Tuple.

Type Parameters

T

the data type of observations.