public class AveragedPerceptron extends Object
| Modifier and Type | Field and Description |
|---|---|
int |
dependencySize |
int |
iteration |
HashMap<Object,CompactArray>[] |
leftArcFeatureAveragedWeights |
HashMap<Object,CompactArray>[] |
leftArcFeatureWeights |
HashMap<Object,Float>[] |
reduceFeatureAveragedWeights |
HashMap<Object,Float>[] |
reduceFeatureWeights |
HashMap<Object,CompactArray>[] |
rightArcFeatureAveragedWeights |
HashMap<Object,CompactArray>[] |
rightArcFeatureWeights |
HashMap<Object,Float>[] |
shiftFeatureAveragedWeights
This is the main part of the extension to the original perceptron algorithm which the averaging over all the history
|
HashMap<Object,Float>[] |
shiftFeatureWeights
For the weights for all features
|
| Constructor and Description |
|---|
AveragedPerceptron(int featSize,
int dependencySize) |
AveragedPerceptron(ParserModel parserModel) |
| Modifier and Type | Method and Description |
|---|---|
void |
changeFeatureWeight(HashMap<Object,CompactArray> map,
HashMap<Object,CompactArray> aMap,
Object featureName,
int labelIndex,
float change,
int size) |
float |
changeWeight(Action actionType,
int slotNum,
Object featureName,
int labelIndex,
float change) |
int |
effectiveLaSize() |
int |
effectiveRaSize() |
int |
featureSize() |
void |
incrementIteration()
Adds to the iterations
|
int |
laSize() |
float[] |
leftArcScores(Object[] features,
boolean decode) |
int |
raSize() |
float |
reduceScore(Object[] features,
boolean decode) |
float[] |
rightArcScores(Object[] features,
boolean decode) |
float |
shiftScore(Object[] features,
boolean decode) |
public HashMap<Object,Float>[] shiftFeatureWeights
public HashMap<Object,CompactArray>[] leftArcFeatureWeights
public HashMap<Object,CompactArray>[] rightArcFeatureWeights
public int iteration
public int dependencySize
public HashMap<Object,Float>[] shiftFeatureAveragedWeights
public HashMap<Object,CompactArray>[] leftArcFeatureAveragedWeights
public HashMap<Object,CompactArray>[] rightArcFeatureAveragedWeights
public AveragedPerceptron(int featSize,
int dependencySize)
public AveragedPerceptron(ParserModel parserModel)
public float changeWeight(Action actionType, int slotNum, Object featureName, int labelIndex, float change)
public void changeFeatureWeight(HashMap<Object,CompactArray> map, HashMap<Object,CompactArray> aMap, Object featureName, int labelIndex, float change, int size)
public void incrementIteration()
public float shiftScore(Object[] features, boolean decode)
public float reduceScore(Object[] features, boolean decode)
public float[] leftArcScores(Object[] features, boolean decode)
public float[] rightArcScores(Object[] features, boolean decode)
public int featureSize()
public int raSize()
public int effectiveRaSize()
public int laSize()
public int effectiveLaSize()
Copyright © 2014–2021 码农场. All rights reserved.