## Uses of Interface
org.apache.ignite.ml.math.primitives.matrix.Matrix

- Packages that use Matrix
  Package | Description
  --- | ---
  org.apache.ignite.ml.composition.stacking | Contains classes used for training with stacking technique.
  org.apache.ignite.ml.math | Contains main APIs for matrix/vector algebra.
  org.apache.ignite.ml.math.primitives.matrix | Contains matrix related classes.
  org.apache.ignite.ml.math.primitives.matrix.impl | Contains several matrix implementations.
  org.apache.ignite.ml.math.primitives.vector | Contains vector related classes.
  org.apache.ignite.ml.math.primitives.vector.impl | Contains several vector implementations.
  org.apache.ignite.ml.math.primitives.vector.storage | Contains several vector storages.
  org.apache.ignite.ml.math.stat | Contains utility classes for distributions.
  org.apache.ignite.ml.math.util | Some math utils.
  org.apache.ignite.ml.nn | Contains neural networks and related classes.
  org.apache.ignite.ml.nn.initializers | Contains multilayer perceptron parameters initializers.
  org.apache.ignite.ml.optimization | Contains implementations of optimization algorithms and related classes.
  org.apache.ignite.ml.optimization.updatecalculators | Contains update calculators.

- - ### Uses of Matrix in org.apache.ignite.ml.composition.stacking

    Methods in org.apache.ignite.ml.composition.stacking with type parameters of type Matrix
    Modifier and Type | Method and Description
    --- | ---
    `<M1 extends IgniteModel<Matrix,Matrix>> StackedVectorDatasetTrainer<O,AM,L>` | StackedVectorDatasetTrainer.`addMatrix2MatrixTrainer(DatasetTrainer<M1,L> trainer)` Shortcut for adding trainer `Matrix -> Matrix` where this trainer is treated as `Vector -> Vector`, where input `Vector` is turned into `1 x cols` `Matrix` and output is a first row of output `Matrix`.
    `<M1 extends IgniteModel<Matrix,Matrix>> StackedVectorDatasetTrainer<O,AM,L>` | StackedVectorDatasetTrainer.`addMatrix2MatrixTrainer(DatasetTrainer<M1,L> trainer)` Shortcut for adding trainer `Matrix -> Matrix` where this trainer is treated as `Vector -> Vector`, where input `Vector` is turned into `1 x cols` `Matrix` and output is a first row of output `Matrix`.

  - ### Uses of Matrix in org.apache.ignite.ml.math

    Methods in org.apache.ignite.ml.math with parameters of type Matrix
    Modifier and Type | Method and Description
    --- | ---
    `static String` | Tracer.`asAscii(Matrix mtx, String fmt)`
    `static void` | Blas.`checkCardinality(Matrix a, Vector v)` Checks if Matrix A can be multiplied by vector v, if not CardinalityException is thrown.
    `static void` | Blas.`gemm(double alpha, Matrix a, Matrix b, double beta, Matrix c)` For the moment we have no flags indicating if matrix is transposed or not.
    `static void` | Blas.`gemv(double alpha, Matrix a, Vector x, double beta, Vector y)` y := alpha * A * x + beta * y.
    `static void` | Tracer.`saveAsCsv(Matrix mtx, String fmt, String filePath)` Saves given matrix as CSV file.
    `static void` | Tracer.`showAscii(Matrix mtx)`
    `static void` | Tracer.`showAscii(Matrix mtx, IgniteLogger log, String fmt)`
    `static void` | Tracer.`showAscii(Matrix mtx, String fmt)`
    `static void` | Tracer.`showHtml(Matrix mtx)` Shows given matrix in the browser with D3-based visualization.
    `static void` | Tracer.`showHtml(Matrix mtx, boolean useAsciiFallback)` Shows given matrix in the browser with D3-based visualization.
    `static void` | Tracer.`showHtml(Matrix mtx, Tracer.ColorMapper cm)` Shows given matrix in the browser with D3-based visualization.
    `static void` | Tracer.`showHtml(Matrix mtx, Tracer.ColorMapper cm, boolean useAsciiFallback)` Shows given matrix in the browser with D3-based visualization.

  - ### Uses of Matrix in org.apache.ignite.ml.math.primitives.matrix

    Classes in org.apache.ignite.ml.math.primitives.matrix that implement Matrix
    Modifier and Type | Class and Description
    --- | ---
    `class` | `AbstractMatrix` This class provides a helper implementation of the `Matrix` interface to minimize the effort required to implement it.

    Methods in org.apache.ignite.ml.math.primitives.matrix that return Matrix
    Modifier and Type | Method and Description
    --- | ---
    `Matrix` | Matrix.`assign(double val)` Assigns given value to all elements of this matrix.
    `Matrix` | AbstractMatrix.`assign(double val)` Assigns given value to all elements of this matrix.
    `Matrix` | Matrix.`assign(double[][] vals)` Assigns given values to this matrix.
    `Matrix` | AbstractMatrix.`assign(double[][] vals)` Assigns given values to this matrix.
    `Matrix` | Matrix.`assign(IntIntToDoubleFunction fun)` Assigns each matrix element to the value generated by given function.
    `Matrix` | AbstractMatrix.`assign(IntIntToDoubleFunction fun)` Assigns each matrix element to the value generated by given function.
    `Matrix` | Matrix.`assign(Matrix mtx)` Assigns values from given matrix to this matrix.
    `Matrix` | AbstractMatrix.`assign(Matrix mtx)` Assigns values from given matrix to this matrix.
    `Matrix` | Matrix.`assignColumn(int col, Vector vec)` Assigns values from given vector to the specified column in this matrix.
    `Matrix` | AbstractMatrix.`assignColumn(int col, Vector vec)` Assigns values from given vector to the specified column in this matrix.
    `Matrix` | Matrix.`assignRow(int row, Vector vec)` Assigns values from given vector to the specified row in this matrix.
    `Matrix` | AbstractMatrix.`assignRow(int row, Vector vec)` Assigns values from given vector to the specified row in this matrix.
    `Matrix` | Matrix.`copy()` Clones this matrix.
    `Matrix` | AbstractMatrix.`copy()` Clones this matrix.
    `Matrix` | Matrix.`divide(double x)` Divides each value in this matrix by the argument.
    `Matrix` | AbstractMatrix.`divide(double d)` Divides each value in this matrix by the argument.
    `Matrix` | LUDecomposition.`getL()` Returns the matrix L of the decomposition.
    `Matrix` | LUDecomposition.`getP()` Returns the P rows permutation matrix.
    `Matrix` | LUDecomposition.`getU()` Returns the matrix U of the decomposition.
    `Matrix` | Matrix.`inverse()` Returns the inverse matrix of this matrix
    `Matrix` | AbstractMatrix.`inverse()` Returns the inverse matrix of this matrix
    `Matrix` | Matrix.`like(int rows, int cols)` Creates new empty matrix of the same underlying class but of different size.
    `protected Matrix` | AbstractMatrix.`likeIdentity()`
    `Matrix` | Matrix.`map(IgniteDoubleFunction<Double> fun)` Maps all values in this matrix through a given function.
    `Matrix` | AbstractMatrix.`map(IgniteDoubleFunction<Double> fun)` Maps all values in this matrix through a given function.
    `Matrix` | Matrix.`map(Matrix mtx, IgniteBiFunction<Double,Double,Double> fun)` Maps all values in this matrix through a given function.
    `Matrix` | AbstractMatrix.`map(Matrix mtx, IgniteBiFunction<Double,Double,Double> fun)` Maps all values in this matrix through a given function.
    `Matrix` | Matrix.`minus(Matrix mtx)` Creates new matrix where each value is a difference between corresponding value of this matrix and passed in argument matrix.
    `Matrix` | AbstractMatrix.`minus(Matrix mtx)` Creates new matrix where each value is a difference between corresponding value of this matrix and passed in argument matrix.
    `Matrix` | Matrix.`plus(double x)` Creates new matrix where each value is a sum of the corresponding value of this matrix and argument value.
    `Matrix` | AbstractMatrix.`plus(double x)` Creates new matrix where each value is a sum of the corresponding value of this matrix and argument value.
    `Matrix` | Matrix.`plus(Matrix mtx)` Creates new matrix where each value is a sum of corresponding values of this matrix and passed in argument matrix.
    `Matrix` | AbstractMatrix.`plus(Matrix mtx)` Creates new matrix where each value is a sum of corresponding values of this matrix and passed in argument matrix.
    `Matrix` | Matrix.`set(int row, int col, double val)` Sets given value.
    `Matrix` | AbstractMatrix.`set(int row, int col, double val)` Sets given value.
    `Matrix` | Matrix.`setColumn(int col, double[] data)` Sets values for given column.
    `Matrix` | AbstractMatrix.`setColumn(int col, double[] data)` Sets values for given column.
    `Matrix` | Matrix.`setRow(int row, double[] data)` Sets values for given row.
    `Matrix` | AbstractMatrix.`setRow(int row, double[] data)` Sets values for given row.
    `Matrix` | Matrix.`setX(int row, int col, double val)` Sets given value without checking for index bounds.
    `Matrix` | AbstractMatrix.`setX(int row, int col, double val)` Sets given value without checking for index bounds.
    `Matrix` | LUDecomposition.`solve(Matrix b)`
    `Matrix` | Matrix.`swapColumns(int col1, int col2)` Swaps two columns in this matrix.
    `Matrix` | AbstractMatrix.`swapColumns(int col1, int col2)` Swaps two columns in this matrix.
    `Matrix` | Matrix.`swapRows(int row1, int row2)` Swaps two rows in this matrix.
    `Matrix` | AbstractMatrix.`swapRows(int row1, int row2)` Swaps two rows in this matrix.
    `Matrix` | Matrix.`times(double x)` Creates new matrix containing the product of given value and values in this matrix.
    `Matrix` | AbstractMatrix.`times(double x)` Creates new matrix containing the product of given value and values in this matrix.
    `Matrix` | Matrix.`times(Matrix mtx)` Creates new matrix that is the product of multiplying this matrix and the argument matrix.
    `Matrix` | AbstractMatrix.`times(Matrix mtx)` Creates new matrix that is the product of multiplying this matrix and the argument matrix.
    `Matrix` | Matrix.`transpose()` Creates new matrix that is transpose of this matrix.
    `Matrix` | AbstractMatrix.`transpose()` Creates new matrix that is transpose of this matrix.

    Methods in org.apache.ignite.ml.math.primitives.matrix with parameters of type Matrix
    Modifier and Type | Method and Description
    --- | ---
    `Matrix` | Matrix.`assign(Matrix mtx)` Assigns values from given matrix to this matrix.
    `Matrix` | AbstractMatrix.`assign(Matrix mtx)` Assigns values from given matrix to this matrix.
    `Matrix` | Matrix.`map(Matrix mtx, IgniteBiFunction<Double,Double,Double> fun)` Maps all values in this matrix through a given function.
    `Matrix` | AbstractMatrix.`map(Matrix mtx, IgniteBiFunction<Double,Double,Double> fun)` Maps all values in this matrix through a given function.
    `Matrix` | Matrix.`minus(Matrix mtx)` Creates new matrix where each value is a difference between corresponding value of this matrix and passed in argument matrix.
    `Matrix` | AbstractMatrix.`minus(Matrix mtx)` Creates new matrix where each value is a difference between corresponding value of this matrix and passed in argument matrix.
    `Matrix` | Matrix.`plus(Matrix mtx)` Creates new matrix where each value is a sum of corresponding values of this matrix and passed in argument matrix.
    `Matrix` | AbstractMatrix.`plus(Matrix mtx)` Creates new matrix where each value is a sum of corresponding values of this matrix and passed in argument matrix.
    `Matrix` | LUDecomposition.`solve(Matrix b)`
    `Matrix` | Matrix.`times(Matrix mtx)` Creates new matrix that is the product of multiplying this matrix and the argument matrix.
    `Matrix` | AbstractMatrix.`times(Matrix mtx)` Creates new matrix that is the product of multiplying this matrix and the argument matrix.

    Constructors in org.apache.ignite.ml.math.primitives.matrix with parameters of type Matrix
    Constructor and Description
    `LUDecomposition(Matrix matrix)` Calculates the LU-decomposition of the given matrix.
    `LUDecomposition(Matrix matrix, double singularityThreshold)` Calculates the LUP-decomposition of the given matrix.

  - ### Uses of Matrix in org.apache.ignite.ml.math.primitives.matrix.impl

    Classes in org.apache.ignite.ml.math.primitives.matrix.impl that implement Matrix
    Modifier and Type | Class and Description
    --- | ---
    `class` | `DenseMatrix` Basic implementation for matrix.
    `class` | `SparseMatrix` Sparse local onheap matrix with `SparseVector` as rows.
    `class` | `ViewMatrix` Implements the rectangular view into the parent `Matrix`.

    Methods in org.apache.ignite.ml.math.primitives.matrix.impl that return Matrix
    Modifier and Type | Method and Description
    --- | ---
    `Matrix` | SparseMatrix.`copy()` Clones this matrix.
    `Matrix` | ViewMatrix.`copy()` Clones this matrix.
    `Matrix` | DenseMatrix.`copy()` Clones this matrix.
    `Matrix` | SparseMatrix.`like(int rows, int cols)` Creates new empty matrix of the same underlying class but of different size.
    `Matrix` | ViewMatrix.`like(int rows, int cols)` Creates new empty matrix of the same underlying class but of different size.
    `Matrix` | DenseMatrix.`like(int rows, int cols)` Creates new empty matrix of the same underlying class but of different size.

    Constructors in org.apache.ignite.ml.math.primitives.matrix.impl with parameters of type Matrix
    Constructor and Description
    `ViewMatrix(Matrix parent, int rowOff, int colOff, int rows, int cols)`

  - ### Uses of Matrix in org.apache.ignite.ml.math.primitives.vector

    Methods in org.apache.ignite.ml.math.primitives.vector that return Matrix
    Modifier and Type | Method and Description
    --- | ---
    `Matrix` | Vector.`cross(Vector vec)` Gets the cross product of this vector and the other vector.
    `Matrix` | AbstractVector.`cross(Vector vec)` Gets the cross product of this vector and the other vector.
    `Matrix` | Vector.`likeMatrix(int rows, int cols)` Creates new matrix of compatible flavor with given size.
    `Matrix` | Vector.`toMatrix(boolean rowLike)` Converts this vector into [N x 1] or [1 x N] matrix where N is this vector cardinality.
    `Matrix` | AbstractVector.`toMatrix(boolean rowLike)` Converts this vector into [N x 1] or [1 x N] matrix where N is this vector cardinality.
    `Matrix` | Vector.`toMatrixPlusOne(boolean rowLike, double zeroVal)` Converts this vector into [N+1 x 1] or [1 x N+1] matrix where N is this vector cardinality
    `Matrix` | AbstractVector.`toMatrixPlusOne(boolean rowLike, double zeroVal)` Converts this vector into [N+1 x 1] or [1 x N+1] matrix where N is this vector cardinality

  - ### Uses of Matrix in org.apache.ignite.ml.math.primitives.vector.impl

    Methods in org.apache.ignite.ml.math.primitives.vector.impl that return Matrix
    Modifier and Type | Method and Description
    --- | ---
    `Matrix` | DelegatingVector.`cross(Vector vec)` Gets the cross product of this vector and the other vector.
    `Matrix` | DelegatingVector.`likeMatrix(int rows, int cols)` Creates new matrix of compatible flavor with given size.
    `Matrix` | VectorView.`likeMatrix(int rows, int cols)` Creates new matrix of compatible flavor with given size.
    `Matrix` | SparseVector.`likeMatrix(int rows, int cols)` Creates new matrix of compatible flavor with given size.
    `Matrix` | DenseVector.`likeMatrix(int rows, int cols)` Creates new matrix of compatible flavor with given size.
    `Matrix` | VectorizedViewMatrix.`likeMatrix(int rows, int cols)` Creates new matrix of compatible flavor with given size.
    `Matrix` | DelegatingVector.`toMatrix(boolean rowLike)` Converts this vector into [N x 1] or [1 x N] matrix where N is this vector cardinality.
    `Matrix` | DelegatingVector.`toMatrixPlusOne(boolean rowLike, double zeroVal)` Converts this vector into [N+1 x 1] or [1 x N+1] matrix where N is this vector cardinality

    Constructors in org.apache.ignite.ml.math.primitives.vector.impl with parameters of type Matrix
    Constructor and Description
    `VectorizedViewMatrix(Matrix parent, int row, int col, int rowStride, int colStride)`

  - ### Uses of Matrix in org.apache.ignite.ml.math.primitives.vector.storage

    Constructors in org.apache.ignite.ml.math.primitives.vector.storage with parameters of type Matrix
    Constructor and Description
    `VectorizedViewMatrixStorage(Matrix parent, int row, int col, int rowStride, int colStride)`

  - ### Uses of Matrix in org.apache.ignite.ml.math.stat

    Methods in org.apache.ignite.ml.math.stat that return Matrix
    Modifier and Type | Method and Description
    --- | ---
    `Matrix` | MultivariateGaussianDistribution.`covariance()`

    Constructors in org.apache.ignite.ml.math.stat with parameters of type Matrix
    Constructor and Description
    `MultivariateGaussianDistribution(Vector mean, Matrix covariance)` Constructs an instance of MultivariateGaussianDistribution.

  - ### Uses of Matrix in org.apache.ignite.ml.math.util

    Methods in org.apache.ignite.ml.math.util that return Matrix
    Modifier and Type | Method and Description
    --- | ---
    `static Matrix` | MatrixUtil.`copy(Matrix matrix)` Create the copy of matrix with read-only matrices support.
    `static Matrix` | MatrixUtil.`elementWiseMinus(Matrix mtx1, Matrix mtx2)` Performs in-place matrix subtraction.
    `static Matrix` | MatrixUtil.`elementWiseTimes(Matrix mtx1, Matrix mtx2)` Performs in-place matrix multiplication.
    `static Matrix` | MatrixUtil.`identity(int n)` Creates the identity matrix with the given size.
    `static Matrix` | MatrixUtil.`identityLike(Matrix matrix, int n)` Create the identity matrix like a given matrix.
    `static Matrix` | MatrixUtil.`like(Matrix matrix)` Create the like matrix with read-only matrices support.
    `static Matrix` | MatrixUtil.`like(Matrix matrix, int rows, int cols)` Create the like matrix with specified size with read-only matrices support.

    Methods in org.apache.ignite.ml.math.util with parameters of type Matrix
    Modifier and Type | Method and Description
    --- | ---
    `static Matrix` | MatrixUtil.`copy(Matrix matrix)` Create the copy of matrix with read-only matrices support.
    `static Matrix` | MatrixUtil.`elementWiseMinus(Matrix mtx1, Matrix mtx2)` Performs in-place matrix subtraction.
    `static Matrix` | MatrixUtil.`elementWiseTimes(Matrix mtx1, Matrix mtx2)` Performs in-place matrix multiplication.
    `static Matrix` | MatrixUtil.`identityLike(Matrix matrix, int n)` Create the identity matrix like a given matrix.
    `static Matrix` | MatrixUtil.`like(Matrix matrix)` Create the like matrix with read-only matrices support.
    `static Matrix` | MatrixUtil.`like(Matrix matrix, int rows, int cols)` Create the like matrix with specified size with read-only matrices support.
    `static Vector` | MatrixUtil.`likeVector(Matrix matrix)` Create the like vector with read-only matrices support.
    `static Vector` | MatrixUtil.`likeVector(Matrix matrix, int crd)` Create the like vector with read-only matrices support.
    `static void` | MatrixUtil.`unflatten(double[] fArr, Matrix mtx)`
    `static Vector` | MatrixUtil.`zipFoldByColumns(Matrix mtx1, Matrix mtx2, IgniteBiFunction<Vector,Vector,Double> fun)` Zips two matrices by column-by-column with specified function.
    `static Vector` | MatrixUtil.`zipFoldByRows(Matrix mtx1, Matrix mtx2, IgniteBiFunction<Vector,Vector,Double> fun)` Zips two matrices by row-by-row with specified function.

  - ### Uses of Matrix in org.apache.ignite.ml.nn

    Fields in org.apache.ignite.ml.nn declared as Matrix
    Modifier and Type | Field and Description
    --- | ---
    `protected Matrix` | MLPState.`input` Input.
    `protected Matrix` | MLPLayer.`weights` Weights matrix.

    Fields in org.apache.ignite.ml.nn with type parameters of type Matrix
    Modifier and Type | Field and Description
    --- | ---
    `protected List<Matrix>` | MLPState.`activatorsOutput` Output of activators.
    `protected List<Matrix>` | MLPState.`linearOutput` Output of linear transformations.

    Methods in org.apache.ignite.ml.nn that return Matrix
    Modifier and Type | Method and Description
    --- | ---
    `Matrix` | MLPState.`activatorsOutput(int layer)` Output of activators of given layer.
    `Matrix` | MultilayerPerceptron.`forwardPass(Matrix val, MLPState state, boolean writeState)` Perform forward pass and if needed write state of outputs of each layer.
    `Matrix` | MLPState.`linearOutput(int layer)` Output of linear transformation of given layer.
    `Matrix` | MultilayerPerceptron.`predict(Matrix val)` Makes a prediction for the given objects.
    `Matrix` | MultilayerPerceptron.`weights(int layerIdx)` Get weights of layer with given index.

    Methods in org.apache.ignite.ml.nn with parameters of type Matrix
    Modifier and Type | Method and Description
    --- | ---
    `MLPState` | MultilayerPerceptron.`computeState(Matrix val)` Perform forward pass and return state of outputs of each layer.
    `Vector` | MultilayerPerceptron.`differentiateByParameters(IgniteFunction<Vector,IgniteDifferentiableVectorToDoubleFunction> loss, Matrix inputsBatch, Matrix truthBatch)` Compose function in the following way: feed output of this model as input to second argument to loss function.
    `Matrix` | MultilayerPerceptron.`forwardPass(Matrix val, MLPState state, boolean writeState)` Perform forward pass and if needed write state of outputs of each layer.
    `Matrix` | MultilayerPerceptron.`predict(Matrix val)` Makes a prediction for the given objects.
    `MultilayerPerceptron` | MultilayerPerceptron.`setWeights(int layerIdx, Matrix weights)` Sets the weighs of layer with a given index.

    Constructors in org.apache.ignite.ml.nn with parameters of type Matrix
    Constructor and Description
    `MLPLayer(Matrix weights, Vector biases)` Construct MLPLayer from weights and biases.
    `MLPState(Matrix input)` Construct MLP state.

  - ### Uses of Matrix in org.apache.ignite.ml.nn.initializers

    Methods in org.apache.ignite.ml.nn.initializers with parameters of type Matrix
    Modifier and Type | Method and Description
    --- | ---
    `void` | RandomInitializer.`initWeights(Matrix weights)` In-place change values of matrix representing weights.
    `void` | MLPInitializer.`initWeights(Matrix weights)` In-place change values of matrix representing weights.

  - ### Uses of Matrix in org.apache.ignite.ml.optimization

    Methods in org.apache.ignite.ml.optimization with parameters of type Matrix
    Modifier and Type | Method and Description
    --- | ---
    `Vector` | SmoothParametrized.`differentiateByParameters(IgniteFunction<Vector,IgniteDifferentiableVectorToDoubleFunction> loss, Matrix inputsBatch, Matrix truthBatch)` Compose function in the following way: feed output of this model as input to second argument to loss function.

  - ### Uses of Matrix in org.apache.ignite.ml.optimization.updatecalculators

    Methods in org.apache.ignite.ml.optimization.updatecalculators with parameters of type Matrix
    Modifier and Type | Method and Description
    --- | ---
    `NesterovParameterUpdate` | NesterovUpdateCalculator.`calculateNewUpdate(M mdl, NesterovParameterUpdate updaterParameters, int iteration, Matrix inputs, Matrix groundTruth)` Calculate new update.
    `P` | ParameterUpdateCalculator.`calculateNewUpdate(M mdl, P updaterParameters, int iteration, Matrix inputs, Matrix groundTruth)` Calculate new update.
    `RPropParameterUpdate` | RPropUpdateCalculator.`calculateNewUpdate(SmoothParametrized mdl, RPropParameterUpdate updaterParams, int iteration, Matrix inputs, Matrix groundTruth)` Calculate new update.
    `SimpleGDParameterUpdate` | SimpleGDUpdateCalculator.`calculateNewUpdate(SmoothParametrized mlp, SimpleGDParameterUpdate updaterParameters, int iteration, Matrix inputs, Matrix groundTruth)` Calculate new update.

2022 Copyright © Apache Software Foundation
| Follow @ApacheIgnite
Ignite Database and Caching Platform | : ver. 2.13.0
Release Date | : April 20 2022