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

## org.maltparser.ml
Interface LearningMethod

All Known Implementing Classes:
  Liblinear, Libsvm

    public interface LearningMethod

Field Summary
`static int` | `BATCH`
`static int` | `CLASSIFY`

Method Summary
`void` | `addInstance(SingleDecision decision, FeatureVector featureVector)`
`Map<Integer,Integer>` | `createFeatureIdToCountMap(ArrayList<Integer> divideFeatureIndexVector)`
`double` | `crossValidate(FeatureVector featureVector, int nrOfSplits)` This method does a cross validation of the training instances added and return the average score over the nrOfSplit divisions.
`void` | `decreaseNumberOfInstances()`
`void` | `divideByFeatureSet(Set<Integer> featureIdsToCreateSeparateBranchesForSet, ArrayList<Integer> divideFeatureIndexVector, String otherId)`
`void` | `finalizeSentence(DependencyStructure dependencyGraph)`
`BufferedWriter` | `getInstanceWriter()`
`void` | `increaseNumberOfInstances()`
`void` | `moveAllInstances(LearningMethod method, FeatureFunction divideFeature, ArrayList<Integer> divideFeatureIndexVector)`
`void` | `noMoreInstances()`
`boolean` | `predict(FeatureVector features, SingleDecision decision)`
`void` | `terminate()`
`void` | `train(FeatureVector featureVector)`

Field Detail

### BATCH

    static final int BATCH

See Also:
  Constant Field Values

### CLASSIFY

    static final int CLASSIFY

See Also:
  Constant Field Values

Method Detail

### addInstance

    void addInstance(SingleDecision decision,
                     FeatureVector featureVector)
                     throws MaltChainedException

  Throws:
    `MaltChainedException`

### finalizeSentence

    void finalizeSentence(DependencyStructure dependencyGraph)
                          throws MaltChainedException

  Throws:
    `MaltChainedException`

### noMoreInstances

    void noMoreInstances()
                         throws MaltChainedException

  Throws:
    `MaltChainedException`

### train

    void train(FeatureVector featureVector)
               throws MaltChainedException

  Throws:
    `MaltChainedException`

### crossValidate

    double crossValidate(FeatureVector featureVector,
                         int nrOfSplits)
                         throws MaltChainedException

  This method does a cross validation of the training instances added and return the average score over the nrOfSplit divisions. This method is used by the decision tree model when deciding which parts of the tree that shall be pruned.

  Parameters:
    `featureVector` -
    `nrOfSplits` -
  Returns:
    a double
  Throws:
    `MaltChainedException`

### moveAllInstances

    void moveAllInstances(LearningMethod method,
                          FeatureFunction divideFeature,
                          ArrayList<Integer> divideFeatureIndexVector)
                          throws MaltChainedException

  Throws:
    `MaltChainedException`

### terminate

    void terminate()
                   throws MaltChainedException

  Throws:
    `MaltChainedException`

### predict

    boolean predict(FeatureVector features,
                    SingleDecision decision)
                    throws MaltChainedException

  Throws:
    `MaltChainedException`

### getInstanceWriter

    BufferedWriter getInstanceWriter()

### increaseNumberOfInstances

    void increaseNumberOfInstances()

### decreaseNumberOfInstances

    void decreaseNumberOfInstances()

### divideByFeatureSet

    void divideByFeatureSet(Set<Integer> featureIdsToCreateSeparateBranchesForSet,
                            ArrayList<Integer> divideFeatureIndexVector,
                            String otherId)
                            throws MaltChainedException

  Throws:
    `MaltChainedException`

### createFeatureIdToCountMap

    Map<Integer,Integer> createFeatureIdToCountMap(ArrayList<Integer> divideFeatureIndexVector)
                                                   throws MaltChainedException

  Throws:
    `MaltChainedException`

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

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