Class LineSearch.LineSearchResult

java.lang.Object
opennlp.tools.ml.maxent.quasinewton.LineSearch.LineSearchResult
Enclosing class:
LineSearch

public static class LineSearch.LineSearchResult extends Object
Represents a LineSearch result.
  • 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)