org.apache.ignite.ml.math.isolve.lsqr

## Class AbstractLSQR

- java.lang.Object
- - org.apache.ignite.ml.math.isolve.lsqr.AbstractLSQR

- Direct Known Subclasses:
    LSQROnHeap

      public abstract class AbstractLSQR
      extends Object

  Basic implementation of the LSQR algorithm without assumptions about dataset storage format or data processing device. This implementation is based on SciPy implementation. SciPy implementation: https://github.com/scipy/scipy/blob/master/scipy/sparse/linalg/isolve/lsqr.py#L98.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractLSQR()`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected abstract double` | `beta(double[] x, double alfa, double beta)` Calculates beta.
    `protected abstract double` | `bnorm()` Calculates bnorm.
    `protected abstract Integer` | `getColumns()`
    `protected abstract double[]` | `iter(double bnorm, double[] target)` Perform LSQR iteration.
    `LSQRResult` | `solve(double damp, double atol, double btol, double conlim, double iterLim, boolean calcVar, double[] x0)` Solves given Sparse Linear Systems.

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

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

- - ### Constructor Detail

    - #### AbstractLSQR

          public AbstractLSQR()

  - ### Method Detail

    - #### solve

          public LSQRResult solve(double damp,
                                  double atol,
                                  double btol,
                                  double conlim,
                                  double iterLim,
                                  boolean calcVar,
                                  double[] x0)

      Solves given Sparse Linear Systems.
      Parameters:
        `damp` - Damping coefficient.
        `atol` - Stopping tolerances, if both (atol and btol) are 1.0e-9 (say), the final residual norm should be accurate to about 9 digits.
        `btol` - Stopping tolerances, if both (atol and btol) are 1.0e-9 (say), the final residual norm should be accurate to about 9 digits.
        `conlim` - Another stopping tolerance, LSQR terminates if an estimate of cond(A) exceeds conlim.
        `iterLim` - Explicit limitation on number of iterations (for safety).
        `calcVar` - Whether to estimate diagonals of (A'A + damp^2*I)^{-1}.
        `x0` - Initial value of x.
      Returns:
        Solver result.

    - #### bnorm

          protected abstract double bnorm()

      Calculates bnorm.
      Returns:
        bnorm

    - #### beta

          protected abstract double beta(double[] x,
                                         double alfa,
                                         double beta)

      Calculates beta.
      Parameters:
        `x` - X value.
        `alfa` - Alfa value.
        `beta` - Beta value.
      Returns:
        Beta.

    - #### iter

          protected abstract double[] iter(double bnorm,
                                           double[] target)

      Perform LSQR iteration.
      Parameters:
        `bnorm` - Bnorm value.
        `target` - Target value.
      Returns:
        Iteration result.

    - #### getColumns

          protected abstract Integer getColumns()

2021 Copyright © Apache Software Foundation
| Follow @ApacheIgnite
Ignite Database and Caching Platform | : ver. 2.11.0
Release Date | : September 11 2021