|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.stanford.nlp.maxent.CGRunner
public class CGRunner
This class will call Conjugate Gradient on a LambdaSolve object to find optimal parameters, including imposing a Gaussian prior on those parameters.
Constructor Summary | |
---|---|
CGRunner(LambdaSolve prob,
String filename)
Set up a LambdaSolve problem for solution by Conjugate Gradient. |
|
CGRunner(LambdaSolve prob,
String filename,
double priorSigmaS)
Set up a LambdaSolve problem for solution by Conjugate Gradient, specifying a value for sigma2. |
|
CGRunner(LambdaSolve prob,
String filename,
double tol,
boolean useGaussianPrior,
double priorSigmaS)
Set up a LambdaSolve problem for solution by Conjugate Gradient. |
|
CGRunner(LambdaSolve prob,
String filename,
double tol,
boolean useGaussianPrior,
double[] sigmaSquareds)
Set up a LambdaSolve problem for solution by Conjugate Gradient. |
Method Summary | |
---|---|
void |
solve()
Solves the problem using CG. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CGRunner(LambdaSolve prob, String filename)
prob
- The problem to solvefilename
- Used (with extension) to save intermediate results.public CGRunner(LambdaSolve prob, String filename, double priorSigmaS)
prob
- The problem to solvefilename
- Used (with extension) to save intermediate results.priorSigmaS
- The prior sigma2: this doubled will be
used to divide the lambda2 values as the
prior penalty in the likelihood.public CGRunner(LambdaSolve prob, String filename, double tol, boolean useGaussianPrior, double priorSigmaS)
prob
- The problem to solvefilename
- Used (with extension) to save intermediate results.tol
- Tolerance of errors (passed to CG)useGaussianPrior
- True if parameters should be penalized with
a gaussian prior for smoothingpriorSigmaS
- The prior sigma2: this doubled will be
used to divide the lambda2 values as the
prior penaltypublic CGRunner(LambdaSolve prob, String filename, double tol, boolean useGaussianPrior, double[] sigmaSquareds)
prob
- The problem to solvefilename
- Used (with extension) to save intermediate results.tol
- Tolerance of errors (passed to CG)useGaussianPrior
- True if parameters should be penalized with
a gaussian prior for smoothingsigmaSquareds
- The prior sigma2: this doubled will be
used to divide the lambda2 values as the
prior penaltyMethod Detail |
---|
public void solve()
lambda
array of prob
.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |