Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| MaltParser 1.6
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.maltparser.parser.guide.instance
Class FeatureDivideModel

    java.lang.Object
      org.maltparser.parser.guide.instance.FeatureDivideModel

All Implemented Interfaces:
  InstanceModel, Model

    public class FeatureDivideModel

extends Object
implements InstanceModel

The feature divide model is used for divide the training instances into several models according to a divide feature. Usually this strategy decrease the training and classification time, but can also decrease the accuracy of the parser.

Since:
  1.0
Author:
  Johan Hall

Constructor Summary
`FeatureDivideModel(FeatureVector features, Model parent)` Constructs a feature divide model.

Method Summary
`void` | `addInstance(SingleDecision decision)`
`void` | `decreaseFrequency()`
`FeatureVector` | `extract()`
`void` | `finalizeSentence(DependencyStructure dependencyGraph)`
`FeatureVector` | `getDivideFeatureVector()` Returns the divide feature vector
`int` | `getFrequency()` Returns the frequency (number of instances)
`ClassifierGuide` | `getGuide()`
`FeatureVector` | `getMasterFeatureVector()` Returns the "sum-up" or master feature vector
`String` | `getModelName()`
`Model` | `getParent()` Returns the parent model
`void` | `increaseFrequency()` Increase the frequency by 1
`protected void` | `initSplitParam(FeatureVector featureVector)` Initialize the feature split parameters and the split feature vector and master feature vector according to the behavior strategy.
`protected void` | `load()` Loads the feature divide model settings .fsm file.
`void` | `noMoreInstances()`
`boolean` | `predict(SingleDecision decision)`
`FeatureVector` | `predictExtract(SingleDecision decision)`
`protected void` | `save()` Saves the feature divide model settings .fsm file.
`protected void` | `setFrequency(int frequency)` Sets the frequency (number of instances)
`protected void` | `setParent(Model parent)` Sets the parent model
`void` | `terminate()`
`String` | `toString()`
`void` | `train()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### FeatureDivideModel

    public FeatureDivideModel(FeatureVector features,
                              Model parent)
                       throws MaltChainedException

  Constructs a feature divide model.

  Parameters:
    `features` - the feature vector used by the atomic model.
    `parent` - the parent guide model.
  Throws:
    `MaltChainedException`

Method Detail

### addInstance

    public void addInstance(SingleDecision decision)
                     throws MaltChainedException

  Specified by:
    `addInstance` in interface `InstanceModel`
  Throws:
    `MaltChainedException`

### noMoreInstances

    public void noMoreInstances()
                         throws MaltChainedException

  Specified by:
    `noMoreInstances` in interface `Model`
  Throws:
    `MaltChainedException`

### finalizeSentence

    public void finalizeSentence(DependencyStructure dependencyGraph)
                          throws MaltChainedException

  Specified by:
    `finalizeSentence` in interface `Model`
  Throws:
    `MaltChainedException`

### predict

    public boolean predict(SingleDecision decision)
                    throws MaltChainedException

  Specified by:
    `predict` in interface `InstanceModel`
  Throws:
    `MaltChainedException`

### predictExtract

    public FeatureVector predictExtract(SingleDecision decision)
                                 throws MaltChainedException

  Specified by:
    `predictExtract` in interface `InstanceModel`
  Throws:
    `MaltChainedException`

### extract

    public FeatureVector extract()
                          throws MaltChainedException

  Specified by:
    `extract` in interface `InstanceModel`
  Throws:
    `MaltChainedException`

### terminate

    public void terminate()
                   throws MaltChainedException

  Specified by:
    `terminate` in interface `Model`
  Throws:
    `MaltChainedException`

### train

    public void train()
               throws MaltChainedException

  Specified by:
    `train` in interface `InstanceModel`
  Throws:
    `MaltChainedException`

### initSplitParam

    protected void initSplitParam(FeatureVector featureVector)
                           throws MaltChainedException

  Initialize the feature split parameters and the split feature vector and master feature vector according to the behavior strategy.

  Parameters:
    `featureVector` - the parent guide model's feature vector.
  Throws:
    `MaltChainedException`

### save

    protected void save()
                 throws MaltChainedException

  Saves the feature divide model settings .fsm file.

  Throws:
    `MaltChainedException`

### load

    protected void load()
                 throws MaltChainedException

  Loads the feature divide model settings .fsm file.

  Throws:
    `MaltChainedException`

### getParent

    public Model getParent()

  Returns the parent model

  Returns:
    the parent model

### getGuide

    public ClassifierGuide getGuide()

  Specified by:
    `getGuide` in interface `Model`

### setParent

    protected void setParent(Model parent)
                      throws MaltChainedException

  Sets the parent model

  Parameters:
    `parent` - the parent model
  Throws:
    `MaltChainedException`

### getModelName

    public String getModelName()
                        throws MaltChainedException

  Specified by:
    `getModelName` in interface `Model`
  Throws:
    `MaltChainedException`

### getMasterFeatureVector

    public FeatureVector getMasterFeatureVector()

  Returns the "sum-up" or master feature vector

  Returns:
    a feature vector object

### getDivideFeatureVector

    public FeatureVector getDivideFeatureVector()

  Returns the divide feature vector

  Returns:
    a feature vector object

### getFrequency

    public int getFrequency()

  Returns the frequency (number of instances)

  Returns:
    the frequency (number of instances)

### increaseFrequency

    public void increaseFrequency()

  Increase the frequency by 1

  Specified by:
    `increaseFrequency` in interface `InstanceModel`

### decreaseFrequency

    public void decreaseFrequency()

  Specified by:
    `decreaseFrequency` in interface `InstanceModel`

### setFrequency

    protected void setFrequency(int frequency)

  Sets the frequency (number of instances)

  Parameters:
    `frequency` - (number of instances)

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| MaltParser 1.6
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright 2007-2011 Johan Hall, Jens Nilsson and Joakim Nivre.