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

## Class LSQROnHeap<K,V>

- java.lang.Object
- - org.apache.ignite.ml.math.isolve.lsqr.AbstractLSQR
  - - org.apache.ignite.ml.math.isolve.lsqr.LSQROnHeap<K,V>

- All Implemented Interfaces:
    AutoCloseable

      public class LSQROnHeap<K,V>
      extends AbstractLSQR
      implements AutoCloseable

  Distributed implementation of LSQR algorithm based on `AbstractLSQR` and `Dataset`.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `LSQROnHeap(DatasetBuilder<K,V> datasetBuilder, LearningEnvironmentBuilder envBuilder, PartitionDataBuilder<K,V,LSQRPartitionContext,SimpleLabeledDatasetData> partDataBuilder, LearningEnvironment localLearningEnv)` Constructs a new instance of OnHeap LSQR algorithm implementation.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected double` | `beta(double[] x, double alfa, double beta)` Calculates beta.
    `protected double` | `bnorm()` Calculates bnorm.
    `void` | `close()`
    `protected Integer` | `getColumns()` Returns number of columns in dataset.
    `protected double[]` | `iter(double bnorm, double[] target)` Perform LSQR iteration.

    - ### Methods inherited from class org.apache.ignite.ml.math.isolve.lsqr.AbstractLSQR

      `solve`

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

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

- - ### Constructor Detail

    - #### LSQROnHeap

          public LSQROnHeap(DatasetBuilder<K,V> datasetBuilder,
                            LearningEnvironmentBuilder envBuilder,
                            PartitionDataBuilder<K,V,LSQRPartitionContext,SimpleLabeledDatasetData> partDataBuilder,
                            LearningEnvironment localLearningEnv)

      Constructs a new instance of OnHeap LSQR algorithm implementation.
      Parameters:
        `datasetBuilder` - Dataset builder.
        `envBuilder` - Learning environment builder.
        `partDataBuilder` - Partition data builder.

  - ### Method Detail

    - #### bnorm

          protected double bnorm()

      Calculates bnorm.
      Specified by:
        `bnorm` in class `AbstractLSQR`
      Returns:
        bnorm

    - #### beta

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

      Calculates beta.
      Specified by:
        `beta` in class `AbstractLSQR`
      Parameters:
        `x` - X value.
        `alfa` - Alfa value.
        `beta` - Beta value.
      Returns:
        Beta.

    - #### iter

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

      Perform LSQR iteration.
      Specified by:
        `iter` in class `AbstractLSQR`
      Parameters:
        `bnorm` - Bnorm value.
        `target` - Target value.
      Returns:
        Iteration result.

    - #### getColumns

          protected Integer getColumns()

      Returns number of columns in dataset.
      Specified by:
        `getColumns` in class `AbstractLSQR`
      Returns:
        number of columns

    - #### close

          public void close()
                     throws Exception

      Specified by:
        `close` in interface `AutoCloseable`
      Throws:
        `Exception`

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