public class FactoredSequenceModel extends java.lang.Object implements SequenceModel
Constructor and Description 

FactoredSequenceModel(SequenceModel[] models,
double[] weights) 
FactoredSequenceModel(SequenceModel model1,
SequenceModel model2) 
FactoredSequenceModel(SequenceModel model1,
SequenceModel model2,
double wt1,
double wt2)
using this constructor results in a weighted addition of the two models' scores.

Modifier and Type  Method and Description 

int[] 
getPossibleValues(int position)
Return the valid sequence labels (as integer indices) for a particular
position in the sequence.

int 
leftWindow()
How many label positions to the left influence the label assignment
at a particular position.

int 
length() 
int 
rightWindow()
How many label positions to the right influence the label assignment
at a particular position.

double 
scoreOf(int[] sequence)
Computes the score assigned by this model to the whole sequence.

double 
scoreOf(int[] sequence,
int pos)
Computes the score of the element at the given position in the sequence,
conditioned on the values of the elements in all other positions of the
provided sequence.

double[] 
scoresOf(int[] sequence,
int pos)
Computes the scores of labels for the element at the given position in
the sequence, conditioned on the values of the labels at all other
positions of the provided sequence.

public FactoredSequenceModel(SequenceModel model1, SequenceModel model2, double wt1, double wt2)
model1
 model2
 wt1
 weight of model1wt2
 weight of model2public FactoredSequenceModel(SequenceModel model1, SequenceModel model2)
public FactoredSequenceModel(SequenceModel[] models, double[] weights)
public double[] scoresOf(int[] sequence, int pos)
scoresOf
in interface SequenceModel
sequence
 The sequence containing the rest of the values to condition onpos
 The position of the element to give a distribution forpublic double scoreOf(int[] sequence, int pos)
scoreOf
in interface SequenceModel
sequence
 The sequence containing the prediction and the rest of the
labels to condition onpos
 The position of the element to give a score forpublic double scoreOf(int[] sequence)
scoreOf
in interface SequenceModel
sequence
 The sequence of labels to compute a score forpublic int length()
length
in interface SequenceModel
public int leftWindow()
leftWindow
in interface SequenceModel
public int rightWindow()
rightWindow
in interface SequenceModel
public int[] getPossibleValues(int position)
getPossibleValues
in interface SequenceModel
position
 The position