public class FeatureDivideModel extends java.lang.Object implements InstanceModel
| Constructor and Description |
|---|
FeatureDivideModel(Model parent)
Constructs a feature divide model.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addInstance(FeatureVector featureVector,
SingleDecision decision) |
void |
decreaseFrequency() |
FeatureVector |
extract(FeatureVector featureVector) |
void |
finalizeSentence(DependencyStructure dependencyGraph) |
int |
getFrequency()
Returns the frequency (number of instances)
|
ClassifierGuide |
getGuide() |
java.lang.String |
getModelName() |
Model |
getParent()
Returns the parent model
|
void |
increaseFrequency()
Increase the frequency by 1
|
protected void |
load() |
void |
noMoreInstances(FeatureModel featureModel) |
boolean |
predict(FeatureVector featureVector,
SingleDecision decision) |
FeatureVector |
predictExtract(FeatureVector featureVector,
SingleDecision decision) |
protected void |
save()
Saves the feature divide model settings .dsm file.
|
protected void |
setFrequency(int frequency)
Sets the frequency (number of instances)
|
void |
terminate() |
java.lang.String |
toString() |
void |
train() |
public FeatureDivideModel(Model parent) throws MaltChainedException
parent - the parent guide model.MaltChainedExceptionpublic void addInstance(FeatureVector featureVector, SingleDecision decision) throws MaltChainedException
addInstance in interface InstanceModelMaltChainedExceptionpublic void noMoreInstances(FeatureModel featureModel) throws MaltChainedException
noMoreInstances in interface ModelMaltChainedExceptionpublic void finalizeSentence(DependencyStructure dependencyGraph) throws MaltChainedException
finalizeSentence in interface ModelMaltChainedExceptionpublic boolean predict(FeatureVector featureVector, SingleDecision decision) throws MaltChainedException
predict in interface InstanceModelMaltChainedExceptionpublic FeatureVector predictExtract(FeatureVector featureVector, SingleDecision decision) throws MaltChainedException
predictExtract in interface InstanceModelMaltChainedExceptionpublic FeatureVector extract(FeatureVector featureVector) throws MaltChainedException
extract in interface InstanceModelMaltChainedExceptionpublic void terminate() throws MaltChainedException
terminate in interface ModelMaltChainedExceptionpublic void train() throws MaltChainedException
train in interface InstanceModelMaltChainedExceptionprotected void save() throws MaltChainedException
MaltChainedExceptionprotected void load() throws MaltChainedException
MaltChainedExceptionpublic ClassifierGuide getGuide()
public java.lang.String getModelName() throws MaltChainedException
getModelName in interface ModelMaltChainedExceptionpublic int getFrequency()
public void increaseFrequency()
increaseFrequency in interface InstanceModelpublic void decreaseFrequency()
decreaseFrequency in interface InstanceModelprotected void setFrequency(int frequency)
frequency - (number of instances)public java.lang.String toString()
toString in class java.lang.ObjectCopyright 2007-2017 Johan Hall, Jens Nilsson and Joakim Nivre.