LineSearch.LineSearchResult (Apache OpenNLP :: Core :: ML :: Maximum Entropy 3.0.0-M4 API)
Description: declaration: package: opennlp.tools.ml.maxent.quasinewton, class: LineSearch, class: LineSearchResult

Package opennlp.tools.ml.maxent.quasinewton

# 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 encapsulating the relevant data at a point in time during computation.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `LineSearchResult(double stepSize, double valueAtCurr, double valueAtNext, double[] gradAtCurr, double[] gradAtNext, double[] pseudoGradAtNext, double[] currPoint, double[] nextPoint, double[] signVector, int fctEvalCount)`
  Initializes a `LineSearch.LineSearchResult` object with the specified parameters.
  `LineSearchResult(double stepSize, double valueAtCurr, double valueAtNext, double[] gradAtCurr, double[] gradAtNext, double[] currPoint, double[] nextPoint, int fctEvalCount)`
  Initializes a `LineSearch.LineSearchResult` object with the specified parameters.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `double[]`
  `getCurrPoint()`
  `int`
  `getFctEvalCount()`
  `double`
  `getFuncChangeRate()`
  `double[]`
  `getGradAtCurr()`
  `double[]`
  `getGradAtNext()`
  `static LineSearch.LineSearchResult`
  `getInitialObject(double valueAtX, double[] gradAtX, double[] x)`
  Initial linear search object for L1-regularization.
  `static LineSearch.LineSearchResult`
  `getInitialObject(double valueAtX, double[] gradAtX, double[] pseudoGradAtX, double[] x, double[] signX, int fctEvalCount)`
  Initial linear search object for L1-regularization.
  `static LineSearch.LineSearchResult`
  `getInitialObjectForL1(double valueAtX, double[] gradAtX, double[] pseudoGradAtX, double[] x)`
  Initial linear search object for L1-regularization.
  `double[]`
  `getNextPoint()`
  `double[]`
  `getPseudoGradAtNext()`
  `double[]`
  `getSignVector()`
  `double`
  `getStepSize()`
  `double`
  `getValueAtCurr()`
  `double`
  `getValueAtNext()`
  `void`
  `setAll(double stepSize, double valueAtCurr, double valueAtNext, double[] gradAtCurr, double[] gradAtNext, double[] pseudoGradAtNext, double[] currPoint, double[] nextPoint, double[] signVector, int fctEvalCount)`
  Updates line search elements.
  `void`
  `setAll(double stepSize, double valueAtCurr, double valueAtNext, double[] gradAtCurr, double[] gradAtNext, double[] currPoint, double[] nextPoint, int fctEvalCount)`
  Updates line search elements.
  `void`
  `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)`

  ### Methods inherited from class java.lang.Object

  `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### LineSearchResult

    public LineSearchResult(double stepSize, double valueAtCurr, double valueAtNext, double[] gradAtCurr, double[] gradAtNext, double[] currPoint, double[] nextPoint, int fctEvalCount)
    Initializes a `LineSearch.LineSearchResult` object with the specified parameters.

  - ### LineSearchResult

    public LineSearchResult(double stepSize, double valueAtCurr, double valueAtNext, double[] gradAtCurr, double[] gradAtNext, double[] pseudoGradAtNext, double[] currPoint, double[] nextPoint, double[] signVector, int fctEvalCount)
    Initializes a `LineSearch.LineSearchResult` object with the specified parameters.

- ## Method Details

  - ### setAll

    public void setAll(double stepSize, double valueAtCurr, double valueAtNext, double[] gradAtCurr, double[] gradAtNext, double[] currPoint, double[] nextPoint, int fctEvalCount)
    Updates 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)
    Updates 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 for L1-regularization.
    Parameters:
      `valueAtX` - The value at `x`.
      `gradAtX` - The gradient at `x`.
      `x` - The input `double[]` vector.
    Returns:
      The `LineSearch.LineSearchResult` holding the results.

  - ### getInitialObjectForL1

    public static LineSearch.LineSearchResult getInitialObjectForL1(double valueAtX, double[] gradAtX, double[] pseudoGradAtX, double[] x)
    Initial linear search object for L1-regularization.
    Parameters:
      `valueAtX` - The value at `x`.
      `gradAtX` - The gradient at `x`.
      `pseudoGradAtX` - The pseudo-gradient at `x`.
      `x` - The input `double[]` vector.
    Returns:
      The `LineSearch.LineSearchResult` holding the results.

  - ### getInitialObject

    public static LineSearch.LineSearchResult getInitialObject(double valueAtX, double[] gradAtX, double[] pseudoGradAtX, double[] x, double[] signX, int fctEvalCount)
    Initial linear search object for L1-regularization.
    Parameters:
      `valueAtX` - The value at `x`.
      `gradAtX` - The gradient at `x`.
      `pseudoGradAtX` - The pseudo-gradient at `x`.
      `x` - The input `double[]` vector.
      `signX` - The sign `double[]` vector for `x`.
      `fctEvalCount` - The number of function evaluations. Must be equal to or greater than `0`.
    Returns:
      The `LineSearch.LineSearchResult` holding the results.