|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--edu.stanford.nlp.maxent.iis.ProblemSolverHPSG
Constructor Summary | |
ProblemSolverHPSG()
|
|
ProblemSolverHPSG(String wekaProbFile)
|
Method Summary | |
void |
buildClassifier(String trainFileName,
int iters,
double gaincutoff)
|
void |
dumpWrong(ArrayList trees,
double[] posteriors)
Print out the correct tree with all that have higher probability |
int |
getClassification(DataDouble d)
|
double[] |
getPosteriors(DataDouble d)
|
boolean |
isOk(String key)
|
static void |
main(String[] args)
Parameters : -train trainFileArff ( training will be done now ) -gain double ( the gain cutoff ) -support int ( the minimum number of times a feature must appear to be included ) -test trainFile testFile -iters numIterations ( iterative scaling iterations ) -binary ( indicates that for attributes that are binary we are adding features only for the value 1 of them ) -validation ( use cross-validation to select features ) -clean ( in testing, print only one classification per line ) -ftNum [numFeatures] ( the maximum number of features ) -no_sel ( do not do feature selection ) -usetop [numTop] ( use only top numTop classifiers ) -fixedtop ( do not select number of classifiers to include, use specified ) -crossval ( use cross validation to choose optinmal number of clasisifers to combine ) |
void |
makeFeatures()
|
void |
normalizeForConstraints(DiffFunction[] constraints,
double[] lambda,
DiffFunction objective)
making a PCFG model |
void |
printFeatures()
|
void |
printTree(DataDouble d,
DataDouble ref)
Print all features in a tree with their weights but only if the differ from values in another tree |
void |
printTreeLeaves(DataDouble d)
print all features for which the name contains a terminal |
void |
read(String filename)
|
String[][] |
readInfo(String filename)
read in sentence info and return it in ArrayList |
void |
readTrainingInstances(String wekaDataFile)
|
void |
save(String filename)
|
double |
test(ArrayList trees)
these trees are all for one sentence the tester chooses one of them as correct returns 1/numtied is a tie for first place and correct, ow 0 |
void |
test(String fileName)
This file is supposed to be in Weka format The class attribute might be missing |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ProblemSolverHPSG()
public ProblemSolverHPSG(String wekaProbFile)
Method Detail |
public void normalizeForConstraints(DiffFunction[] constraints, double[] lambda, DiffFunction objective)
public void readTrainingInstances(String wekaDataFile) throws Exception
Exception
public void makeFeatures()
public boolean isOk(String key)
public void buildClassifier(String trainFileName, int iters, double gaincutoff) throws Exception
Exception
public void dumpWrong(ArrayList trees, double[] posteriors)
public void printTreeLeaves(DataDouble d)
public void printTree(DataDouble d, DataDouble ref)
public double test(ArrayList trees)
public void test(String fileName)
public int getClassification(DataDouble d)
public double[] getPosteriors(DataDouble d)
public static void main(String[] args)
public void save(String filename)
public void read(String filename)
public void printFeatures()
public String[][] readInfo(String filename)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |