Class LineSearch.LineSearchResult
java.lang.Object
opennlp.tools.ml.maxent.quasinewton.LineSearch.LineSearchResult
- Enclosing class:
- LineSearch
Represents a LineSearch result.
-
Constructor Summary
ConstructorDescriptionLineSearchResult
(double stepSize, double valueAtCurr, double valueAtNext, double[] gradAtCurr, double[] gradAtNext, double[] pseudoGradAtNext, double[] currPoint, double[] nextPoint, double[] signVector, int fctEvalCount) Constructor with sign vectorLineSearchResult
(double stepSize, double valueAtCurr, double valueAtNext, double[] gradAtCurr, double[] gradAtNext, double[] currPoint, double[] nextPoint, int fctEvalCount) Constructor -
Method Summary
Modifier and TypeMethodDescriptiondouble[]
int
double
double[]
double[]
static LineSearch.LineSearchResult
getInitialObject
(double valueAtX, double[] gradAtX, double[] x) Initial linear search object.static LineSearch.LineSearchResult
getInitialObject
(double valueAtX, double[] gradAtX, double[] pseudoGradAtX, double[] x, double[] signX, int fctEvalCount) static LineSearch.LineSearchResult
getInitialObjectForL1
(double valueAtX, double[] gradAtX, double[] pseudoGradAtX, double[] x) Initial linear search object for L1-regularization.double[]
double[]
double[]
double
double
double
void
setAll
(double stepSize, double valueAtCurr, double valueAtNext, double[] gradAtCurr, double[] gradAtNext, double[] pseudoGradAtNext, double[] currPoint, double[] nextPoint, double[] signVector, int fctEvalCount) Update line search elementsvoid
setAll
(double stepSize, double valueAtCurr, double valueAtNext, double[] gradAtCurr, double[] gradAtNext, double[] currPoint, double[] nextPoint, int fctEvalCount) Update line search elementsvoid
setCurrPoint
(double[] currPoint) void
setFctEvalCount
(int fctEvalCount) void
setGradAtCurr
(double[] gradAtCurr) void
setGradAtNext
(double[] gradAtNext) void
setNextPoint
(double[] nextPoint) void
setPseudoGradAtNext
(double[] pseudoGradAtNext) void
setSignVector
(double[] signVector) void
setStepSize
(double stepSize) void
setValueAtCurr
(double valueAtCurr) void
setValueAtNext
(double valueAtNext)
-
Constructor Details
-
LineSearchResult
public LineSearchResult(double stepSize, double valueAtCurr, double valueAtNext, double[] gradAtCurr, double[] gradAtNext, double[] currPoint, double[] nextPoint, int fctEvalCount) Constructor -
LineSearchResult
public LineSearchResult(double stepSize, double valueAtCurr, double valueAtNext, double[] gradAtCurr, double[] gradAtNext, double[] pseudoGradAtNext, double[] currPoint, double[] nextPoint, double[] signVector, int fctEvalCount) Constructor with sign vector
-
-
Method Details
-
setAll
public void setAll(double stepSize, double valueAtCurr, double valueAtNext, double[] gradAtCurr, double[] gradAtNext, double[] currPoint, double[] nextPoint, int fctEvalCount) Update line search elements -
setAll
public void setAll(double stepSize, double valueAtCurr, double valueAtNext, double[] gradAtCurr, double[] gradAtNext, double[] pseudoGradAtNext, double[] currPoint, double[] nextPoint, double[] signVector, int fctEvalCount) Update line search elements -
getFuncChangeRate
public double getFuncChangeRate() -
getStepSize
public double getStepSize() -
setStepSize
public void setStepSize(double stepSize) -
getValueAtCurr
public double getValueAtCurr() -
setValueAtCurr
public void setValueAtCurr(double valueAtCurr) -
getValueAtNext
public double getValueAtNext() -
setValueAtNext
public void setValueAtNext(double valueAtNext) -
getGradAtCurr
public double[] getGradAtCurr() -
setGradAtCurr
public void setGradAtCurr(double[] gradAtCurr) -
getGradAtNext
public double[] getGradAtNext() -
setGradAtNext
public void setGradAtNext(double[] gradAtNext) -
getPseudoGradAtNext
public double[] getPseudoGradAtNext() -
setPseudoGradAtNext
public void setPseudoGradAtNext(double[] pseudoGradAtNext) -
getCurrPoint
public double[] getCurrPoint() -
setCurrPoint
public void setCurrPoint(double[] currPoint) -
getNextPoint
public double[] getNextPoint() -
setNextPoint
public void setNextPoint(double[] nextPoint) -
getSignVector
public double[] getSignVector() -
setSignVector
public void setSignVector(double[] signVector) -
getFctEvalCount
public int getFctEvalCount() -
setFctEvalCount
public void setFctEvalCount(int fctEvalCount) -
getInitialObject
public static LineSearch.LineSearchResult getInitialObject(double valueAtX, double[] gradAtX, double[] x) Initial linear search object. -
getInitialObjectForL1
public static LineSearch.LineSearchResult getInitialObjectForL1(double valueAtX, double[] gradAtX, double[] pseudoGradAtX, double[] x) Initial linear search object for L1-regularization. -
getInitialObject
public static LineSearch.LineSearchResult getInitialObject(double valueAtX, double[] gradAtX, double[] pseudoGradAtX, double[] x, double[] signX, int fctEvalCount)
-