|
MaltParser 1.4.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.maltparser.parser.guide.instance.DecisionTreeModel
public class DecisionTreeModel
This class implements a decision tree model. The class is recursive and an instance of the class can be a root model or belong to an other decision tree model. Every node in the decision tree is represented by an instance of the class. Node can be in one of the three states branch model, leaf model or not decided. A branch model has several sub decision tree models and a leaf model owns an atomic model that is used to classify instances. When a decision tree model is in the not decided state it has both sub decision trees and an atomic model. It can be in the not decided state during training before it is tested by cross validation if the sub decision tree models provide better accuracy than the atomic model.
Constructor Summary | |
---|---|
DecisionTreeModel(FeatureVector featureVector,
Model parent)
Constructs a feature divide model. |
Method Summary | |
---|---|
void |
addInstance(SingleDecision decision)
|
void |
decreaseFrequency()
|
FeatureVector |
extract()
|
void |
finalizeSentence(DependencyStructure dependencyGraph)
|
int |
getFrequency()
|
ClassifierGuide |
getGuide()
|
int |
getModelIndex()
|
String |
getModelName()
|
Model |
getParent()
|
void |
increaseFrequency()
Increase the frequency by 1 |
protected void |
load()
Loads the feature divide model settings .fsm file. |
void |
noMoreInstances()
|
boolean |
predict(SingleDecision decision)
|
FeatureVector |
predictExtract(SingleDecision decision)
|
void |
setFrequency(int frequency)
|
void |
setParent(Model parent)
|
void |
terminate()
|
void |
train()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DecisionTreeModel(FeatureVector featureVector, Model parent) throws MaltChainedException
featureVector
- the feature vector used by the decision tree modelparent
- the parent guide model.
MaltChainedException
Method Detail |
---|
protected void load() throws MaltChainedException
MaltChainedException
public void addInstance(SingleDecision decision) throws MaltChainedException
addInstance
in interface InstanceModel
MaltChainedException
public FeatureVector extract() throws MaltChainedException
extract
in interface InstanceModel
MaltChainedException
public void increaseFrequency()
increaseFrequency
in interface InstanceModel
public void decreaseFrequency()
decreaseFrequency
in interface InstanceModel
public boolean predict(SingleDecision decision) throws MaltChainedException
predict
in interface InstanceModel
MaltChainedException
public FeatureVector predictExtract(SingleDecision decision) throws MaltChainedException
predictExtract
in interface InstanceModel
MaltChainedException
public void train() throws MaltChainedException
train
in interface InstanceModel
MaltChainedException
public void finalizeSentence(DependencyStructure dependencyGraph) throws MaltChainedException
finalizeSentence
in interface Model
MaltChainedException
public ClassifierGuide getGuide()
getGuide
in interface Model
public String getModelName() throws MaltChainedException
getModelName
in interface Model
MaltChainedException
public void noMoreInstances() throws MaltChainedException
noMoreInstances
in interface Model
MaltChainedException
public void terminate() throws MaltChainedException
terminate
in interface Model
MaltChainedException
public void setParent(Model parent)
public Model getParent()
public void setFrequency(int frequency)
public int getFrequency()
public int getModelIndex()
|
MaltParser 1.4.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |