The MatrixD
class stores and operates on Numeric Matrices of base type Double
. the 'cfor' loop is used for most loops for faster execution.
Value parameters
- dim
-
the first (row) dimension of the matrix
- dim2
-
the second (column) dimension of the matrix
- v
-
the 2D array used to store matrix elements
Attributes
Members list
Value members
Concrete methods
Multiply this matrix and matrix y (requires y to have at least the dimensions of this). Alias rows to avoid double subscripting, use tiling/blocking, and optimized i, k, j loop order.
Multiply this matrix and matrix y (requires y to have at least the dimensions of this). Alias rows to avoid double subscripting, use tiling/blocking, and optimized i, k, j loop order.
Value parameters
- y
-
the other matrix
Attributes
- See also
-
software.intel.com/content/www/us/en/develop/documentation/advisor-cookbook/top/ optimize-memory-access-patterns-using-loop-interchange-and-cache-blocking-techniques.html
Multiply this matrix and vector y (requires y to have at least dim2 elements). Alias rows to avoid double subscripting and use array ops.
Multiply this matrix and vector y (requires y to have at least dim2 elements). Alias rows to avoid double subscripting and use array ops.
Value parameters
- y
-
the vector to multiply by
Attributes
Multiply this matrix and scaler u.
Multiply this matrix and scaler u.
Value parameters
- u
-
the scalar to multiply by
Attributes
Multiply (row) vector y by this matrix. Note '*:' is right associative. vector = vector *: matrix
Multiply (row) vector y by this matrix. Note '*:' is right associative. vector = vector *: matrix
Value parameters
- y
-
the vector to multiply by
Attributes
Multiply (in-place) this matrix and scaler u.
Multiply (in-place) this matrix and scaler u.
Value parameters
- u
-
the scalar to multiply by
Attributes
Multiply element-wise, this matrix and matrix y (requires y to have at least the dimensions of this). Alias rows to avoid double subscripting. Also known as Hadamard product.
Multiply element-wise, this matrix and matrix y (requires y to have at least the dimensions of this). Alias rows to avoid double subscripting. Also known as Hadamard product.
Value parameters
- y
-
the other matrix
Attributes
Multiply this matrix by vector u to produce another matrix v_ij * u_j. E.g., multiply a matrix by a diagonal matrix represented as a vector.
Multiply this matrix by vector u to produce another matrix v_ij * u_j. E.g., multiply a matrix by a diagonal matrix represented as a vector.
Value parameters
- u
-
the vector to multiply by
Attributes
Multiply vector u by this matrix to produce another matrix u_i * v_ij. E.g., multiply a diagonal matrix represented as a vector by a matrix. This operator is right associative (vector *~: matrix).
Multiply vector u by this matrix to produce another matrix u_i * v_ij. E.g., multiply a diagonal matrix represented as a vector by a matrix. This operator is right associative (vector *~: matrix).
Value parameters
- u
-
the vector to multiply by
Attributes
Add this matrix and matrix y (requires y to have at least the dimensions of this). Alias rows to avoid double subscripting.
Add this matrix and matrix y (requires y to have at least the dimensions of this). Alias rows to avoid double subscripting.
Value parameters
- y
-
the other matrix
Attributes
Add this matrix and (row) vector u.
Add this matrix and (row) vector u.
Value parameters
- u
-
the vector to add
Attributes
Add this matrix and scaler u.
Add this matrix and scaler u.
Value parameters
- u
-
the scalar to add
Attributes
Concatenate (row-wise) this matrix and matrix y (requires y to have the same column dimension as this).
Concatenate (row-wise) this matrix and matrix y (requires y to have the same column dimension as this).
Value parameters
- y
-
the other matrix
Attributes
Concatenate (column-wise) this matrix and matrix y (requires y to have the same row dimension as this).
Concatenate (column-wise) this matrix and matrix y (requires y to have the same row dimension as this).
Value parameters
- y
-
the other matrix
Attributes
Concatenate (row) vector u and this matrix, i.e., prepend u to this.
Concatenate (row) vector u and this matrix, i.e., prepend u to this.
Value parameters
- u
-
the vector to be prepended as the new first row in new matrix
Attributes
Add (in-place) this matrix and matrix y (requires y to have at least the dimensions of this). Alias rows to avoid double subscripting.
Add (in-place) this matrix and matrix y (requires y to have at least the dimensions of this). Alias rows to avoid double subscripting.
Value parameters
- y
-
the other matrix
Attributes
Add (in-place) this matrix and scaler u.
Add (in-place) this matrix and scaler u.
Value parameters
- u
-
the scalar to add
Attributes
Add this matrix and (column) vector u.
Add this matrix and (column) vector u.
Value parameters
- u
-
the vector to add
Attributes
Concatenate (column) vector u and this matrix, i.e., prepend u to this.
Concatenate (column) vector u and this matrix, i.e., prepend u to this.
Value parameters
- u
-
the vector to be prepended as the new first column in new matrix
Attributes
Subtract from this matrix the matrix y (requires y to have at least the dimensions of this). Alias rows to avoid double subscripting.
Subtract from this matrix the matrix y (requires y to have at least the dimensions of this). Alias rows to avoid double subscripting.
Value parameters
- y
-
the other matrix
Attributes
Subtract from this matrix, the (row) vector u.
Subtract from this matrix, the (row) vector u.
Value parameters
- u
-
the vector to subtract
Attributes
Subtract from this matrix, the scalar u.
Subtract from this matrix, the scalar u.
Value parameters
- u
-
the scalar to subtract
Attributes
Subtract (in-place) from this matrix the matrix y (requires y to have at least the dimensions of this). Alias rows to avoid double subscripting.
Subtract (in-place) from this matrix the matrix y (requires y to have at least the dimensions of this). Alias rows to avoid double subscripting.
Value parameters
- y
-
the other matrix
Attributes
Subtract (in-place) from this matrix, the scalar u.
Subtract (in-place) from this matrix, the scalar u.
Value parameters
- u
-
the scalar to subtract
Attributes
Subtract from this matrix, the (column) vector u.
Subtract from this matrix, the (column) vector u.
Value parameters
- u
-
the vector to subtract
Attributes
Divide element-wise, this matrix by matrix y (requires y to have at least the dimensions of this). Alias rows to avoid double subscripting.
Divide element-wise, this matrix by matrix y (requires y to have at least the dimensions of this). Alias rows to avoid double subscripting.
Value parameters
- y
-
the other matrix
Attributes
Divide element-wise, this matrix by (row) vector u.
Divide element-wise, this matrix by (row) vector u.
Value parameters
- u
-
the vector to divide by
Attributes
Divide element-wise this matrix by scaler u.
Divide element-wise this matrix by scaler u.
Value parameters
- u
-
the scalar to divide by
Attributes
Divide (in-place) element-wise this matrix by scaler u.
Divide (in-place) element-wise this matrix by scaler u.
Value parameters
- u
-
the scalar to divide by
Attributes
Solve for x using back substitution (/~) in the equation u * x = y where this matrix (u) must be upper triangular.
Solve for x using back substitution (/~) in the equation u * x = y where this matrix (u) must be upper triangular.
Value parameters
- y
-
the constant vector
Attributes
- See also
-
MatLab's / operator
Concatenate this matrix and (row) vector u, i.e., append u to this.
Concatenate this matrix and (row) vector u, i.e., append u to this.
Value parameters
- u
-
the vector to be appended as the new last row in new matrix
Attributes
Concatenate this matrix and (column) vector u, i.e., append u to this.
Concatenate this matrix and (column) vector u, i.e., append u to this.
Value parameters
- u
-
the vector to be appended as the new last column in new matrix
Attributes
Determine whether this matrix and matrix y are nearly equal.
Determine whether this matrix and matrix y are nearly equal.
Value parameters
- y
-
the other matrix
Attributes
Return the ELEMENT in row i, column j of this matrix. usage: x(3, 2)
Return the ELEMENT in row i, column j of this matrix. usage: x(3, 2)
Value parameters
- i
-
the row index
- j
-
the column index
Attributes
Return the intersection of the ROWS in range ir and COLUMNS in range jr of this matrix as a new independent matrix. usage: x(3 until 6, 2 until 4) Caveat: Only verified for "a until b" ranges, not "a to b" ranges
Return the intersection of the ROWS in range ir and COLUMNS in range jr of this matrix as a new independent matrix. usage: x(3 until 6, 2 until 4) Caveat: Only verified for "a until b" ranges, not "a to b" ranges
Value parameters
- ir
-
the index range of rows to return
- jr
-
the index range of columns to return
Attributes
Return the actual i-th ROW of this matrix. usage: x(3)
Return the actual i-th ROW of this matrix. usage: x(3)
Value parameters
- i
-
the row index
Attributes
Return the ROWS in range ir of this matrix as a new independent matrix. usage: x(3 until 6)
Return the ROWS in range ir of this matrix as a new independent matrix. usage: x(3 until 6)
Value parameters
- ir
-
the index range of rows to return
Attributes
Return the ROWS in range ir of this matrix for column j as a vector. usage: x(3 until 6)
Return the ROWS in range ir of this matrix for column j as a vector. usage: x(3 until 6)
Value parameters
- ir
-
the index range of rows to return
- j
-
the column index
Attributes
Return the ROWS in index set iset of this matrix as a new independent matrix. usage: x(Set (3, 5, 7))
Return the ROWS in index set iset of this matrix as a new independent matrix. usage: x(Set (3, 5, 7))
Value parameters
- iset
-
the index set of rows to return
Attributes
Return the ROWS in index sequence idx of this matrix as a new independent matrix. usage: x(Array (3, 5, 7))
Return the ROWS in index sequence idx of this matrix as a new independent matrix. usage: x(Array (3, 5, 7))
Value parameters
- idx
-
the index sequence of rows to return
Attributes
Return the j-th COLUMN of this matrix as an independent vector. usage: x(?, 2)
Return the j-th COLUMN of this matrix as an independent vector. usage: x(?, 2)
Value parameters
- all
-
use the all rows indicator ?
- j
-
the column index
Attributes
Return the COLUMNS in range jr of this matrix as a new independent matrix. usage: x(?, 2 until 4)
Return the COLUMNS in range jr of this matrix as a new independent matrix. usage: x(?, 2 until 4)
Value parameters
- all
-
use the all rows indicator ?
- jr
-
the index range of columns to return
Attributes
Return the COLUMNS in index set jset of this matrix as a new independent matrix. usage: x(?, Set (2, 4, 6))
Return the COLUMNS in index set jset of this matrix as a new independent matrix. usage: x(?, Set (2, 4, 6))
Value parameters
- all
-
use the all rows indicator ?
- jset
-
the index set of columns to return
Attributes
Return the COLUMNS in index sequence jdx of this matrix as a new independent matrix. usage: x(?, Array (2, 4, 6))
Return the COLUMNS in index sequence jdx of this matrix as a new independent matrix. usage: x(?, Array (2, 4, 6))
Value parameters
- all
-
use the all rows indicator ?
- jdx
-
the index set of columns to return
Attributes
Return the main DIAGONAL of this matrix as a new independent vector. usage: x(?)
Return the main DIAGONAL of this matrix as a new independent vector. usage: x(?)
Value parameters
- diag
-
use the all diagonal elements indicator ?
Attributes
Center this matrix to zero mean, column-wise, by subtracting the mean.
Center this matrix to zero mean, column-wise, by subtracting the mean.
Value parameters
- mu_x
-
the vector of column means for this matrix
Attributes
Get column col from the matrix, returning it as a vector.
Get column col from the matrix, returning it as a vector.
Value parameters
- col
-
the column to extract from the matrix
- from
-
the position to start extracting from
Attributes
Return the 'valid' (no padding) convolution of cofilter matrix c and input matrix x. Take the Hadamard product of c (this) with a slice of x and sum, then shift by one and repeat. Usage: c conv x Caveat: does not include reversal.
Return the 'valid' (no padding) convolution of cofilter matrix c and input matrix x. Take the Hadamard product of c (this) with a slice of x and sum, then shift by one and repeat. Usage: c conv x Caveat: does not include reversal.
Value parameters
- x
-
the input/data matrix
Attributes
- See also
-
`scalation.modeling.neuralnet.CoFilter_1D
Return the 'valid' (no padding) convolution of cofilter matrix c and input matrix x. Computes the discrete convolution of cofilter matrix c and input matrix x. Usage: c conv_ x
Return the 'valid' (no padding) convolution of cofilter matrix c and input matrix x. Computes the discrete convolution of cofilter matrix c and input matrix x. Usage: c conv_ x
Value parameters
- x
-
the input/data matrix
Attributes
Return the 'full' convolution of cofilter c and input matrix x.
Return the 'full' convolution of cofilter c and input matrix x.
Value parameters
- x
-
the input/data matrix
Attributes
Return the 'same' (with padding) convolution of cofilter matrix c and input matrix x. Same means that the size of the result is the same as the input. Usage: c convs x
Return the 'same' (with padding) convolution of cofilter matrix c and input matrix x. Same means that the size of the result is the same as the input. Usage: c convs x
Value parameters
- x
-
the input/data matrix
Attributes
Return a deep copy of this matrix (note: clone may not be deep). Uses Java's native Arrays.copyOf
for efficient copying of 2D array.
Return a deep copy of this matrix (note: clone may not be deep). Uses Java's native Arrays.copyOf
for efficient copying of 2D array.
Attributes
Return the correlation matrix for the columns of this matrix. If either variance is zero (column i, column j), will result in Not-a-Number (NaN), return one if the vectors are the same, or -0 (indicating undefined). Note: sample vs. population results in essentially the same values.
Return the correlation matrix for the columns of this matrix. If either variance is zero (column i, column j), will result in Not-a-Number (NaN), return one if the vectors are the same, or -0 (indicating undefined). Note: sample vs. population results in essentially the same values.
Attributes
- See also
-
the related cos function
Return the correlation vector for the columns of this matrix with vector y. VectorD (for j <- skip until dim2 yield apply(?, j) corr y)
Return the correlation vector for the columns of this matrix with vector y. VectorD (for j <- skip until dim2 yield apply(?, j) corr y)
Value parameters
- skip
-
the number of initial columns to skip (e.g., first column of all ones)
- y
-
the vector to compute correlations with
Attributes
Return the cosine similarity matrix for the columns of matrix 'x'. If the vectors are centered, will give the correlation.
Return the cosine similarity matrix for the columns of matrix 'x'. If the vectors are centered, will give the correlation.
Attributes
- See also
-
stats.stackexchange.com/questions/97051/] building-the-connection-between-cosine-similarity-and-correlation-in-r
Return the sample covariance matrix for the columns of this matrix.
Return the sample covariance matrix for the columns of this matrix.
Attributes
Return the population covariance matrix for the columns of this matrix.
Return the population covariance matrix for the columns of this matrix.
Attributes
Multiply each column of this matrix by its other columns to forms a matrix consisting of all 2-way cross terms [ x_i * x_j ] for j < i.
Multiply each column of this matrix by its other columns to forms a matrix consisting of all 2-way cross terms [ x_i * x_j ] for j < i.
Attributes
Multiply each column of this matrix by its other two columns to forms a matrix consisting of all 3-way cross terms [ x_i * x_j * x_k ] for k < j < i.
Multiply each column of this matrix by its other two columns to forms a matrix consisting of all 3-way cross terms [ x_i * x_j * x_k ] for k < j < i.
Attributes
Combine this matrix with matrix b, placing them along the diagonal and filling in the bottom left and top right regions with zeros; [this, b].
Combine this matrix with matrix b, placing them along the diagonal and filling in the bottom left and top right regions with zeros; [this, b].
Value parameters
- b
-
the matrix to combine with this matrix
Attributes
Return the row and column dimensions of this matrix.
Return the row and column dimensions of this matrix.
Attributes
Return the dot product of this matrix and matrix y (requires y to have at least the dimensions of this). Alias rows to avoid double subscripting, use tiling/blocking, and use array ops.
Return the dot product of this matrix and matrix y (requires y to have at least the dimensions of this). Alias rows to avoid double subscripting, use tiling/blocking, and use array ops.
Value parameters
- y
-
the other matrix
Attributes
- See also
-
en.wikipedia.org/wiki/Matrix_multiplication_algorithm
Return the dot product of this matrix and vector y.
Return the dot product of this matrix and vector y.
Value parameters
- y
-
the vector to take the dot product with
Attributes
Return a matrix containing all but the first n rows of this matrix.
Return a matrix containing all but the first n rows of this matrix.
Value parameters
- n
-
the number of rows to be dropped
Attributes
Exp transform this matrix by using math.exp (the inverse of log).
Exp transform this matrix by using math.exp (the inverse of log).
Attributes
Exp transform (minus 1) this matrix by using math.expm1 (the inverse of log1p).
Exp transform (minus 1) this matrix by using math.expm1 (the inverse of log1p).
Attributes
Flatten this matrix in row-major fashion, returning a vector containing all the elements from the matrix.
Flatten this matrix in row-major fashion, returning a vector containing all the elements from the matrix.
Attributes
Get the k-th DIAGONAL of this matrix.
Get the k-th DIAGONAL of this matrix.
Value parameters
- k
-
how far above the main diagonal, e.g., (-1, 0, 1) for (sub, main, super)
Attributes
Insert vector u into this matrix at j-th COLUMN after shifting j ... k-1 right.
Insert vector u into this matrix at j-th COLUMN after shifting j ... k-1 right.
Value parameters
- j
-
the start column index [... j ... k k+1 ... ] -->
- k
-
the end column index [... u j ... k+1 ... ]
- u
-
the vector to insert into column j
Attributes
Return the inverse of this matrix using the inverse method in the Fac_LU
object. Note, other factorizations also compute the inverse.
Return the inverse of this matrix using the inverse method in the Fac_LU
object. Note, other factorizations also compute the inverse.
Attributes
- See also
-
Fac_Inv
,Fac_Cholesky
,Fac-QR
.
Return whether this matrix is non-negative (has no elements less than 0).
Return whether this matrix is non-negative (has no elements less than 0).
Attributes
Return whether this matrix is symmetric (i.e, equals its transpose).
Return whether this matrix is symmetric (i.e, equals its transpose).
Attributes
Return the last element (at the last row and last column) in the matrix. usage: x.last
Return the last element (at the last row and last column) in the matrix. usage: x.last
Attributes
Log transform this matrix by using math.log.
Log transform this matrix by using math.log.
Attributes
Log (1 plus) transform this matrix by using math.log1p (avoiding the log (0) problem).
Log (1 plus) transform this matrix by using math.log1p (avoiding the log (0) problem).
Attributes
Return the dim-by-dim2 lower triangle of this matrix (rest are zero).
Return the dim-by-dim2 lower triangle of this matrix (rest are zero).
Attributes
Map each row of this matrix by applying function f to each row vector and returning the collected result as a vector. VectorD (for i <- indices yield f(apply(i)))
Map each row of this matrix by applying function f to each row vector and returning the collected result as a vector. VectorD (for i <- indices yield f(apply(i)))
Value parameters
- f
-
the vector to scalar function to apply
Attributes
Map each element of this matrix by applying function f to each element and returning the collected result as a matrix.
Map each element of this matrix by applying function f to each element and returning the collected result as a matrix.
Value parameters
- f
-
the scalar to scalar function to apply
Attributes
Return the maximum value for each column in the matrix. VectorD (for j <- indices2 yield apply(?, j).max)
Return the maximum value for each column in the matrix. VectorD (for j <- indices2 yield apply(?, j).max)
Attributes
Compute the column means of this matrix. VectorD (for j <- indices2 yield apply(?, j).mean)
Compute the column means of this matrix. VectorD (for j <- indices2 yield apply(?, j).mean)
Attributes
Return the minimum value for each column in the matrix. VectorD (for j <- indices2 yield apply(?, j).min)
Return the minimum value for each column in the matrix. VectorD (for j <- indices2 yield apply(?, j).min)
Attributes
Return the minimum and maxinum value for each column in the matrix.
Return the minimum and maxinum value for each column in the matrix.
Attributes
Map each row of this matrix by applying function f to each row vector and returning the collected result as a matrix. MatrixD (for i <- indices yield f(apply(i)))
Map each row of this matrix by applying function f to each row vector and returning the collected result as a matrix. MatrixD (for i <- indices yield f(apply(i)))
Value parameters
- f
-
the vector to vector function to apply
Attributes
Map each column of this matrix by applying function f to each column vector and returning the collected result as a matrix. MatrixD (for j <- indices2 yield f(apply(?, j)))
Map each column of this matrix by applying function f to each column vector and returning the collected result as a matrix. MatrixD (for j <- indices2 yield f(apply(?, j)))
Value parameters
- f
-
the vector to vector function to apply
Attributes
Return the maximum value for the entire matrix.
Return the maximum value for the entire matrix.
Attributes
Compute the matrix/grand mean of this matrix.
Compute the matrix/grand mean of this matrix.
Attributes
Return the minimum value for the entire matrix.
Return the minimum value for the entire matrix.
Attributes
Compute the column maean and standard deviations of this matrix.
Compute the column maean and standard deviations of this matrix.
Attributes
Multiply this matrix and matrix y (requires y to have at least the dimensions of this). Alias rows to avoid double subscripting, transpose y first and use array ops. A simpler, less efficient version of '*'.
Multiply this matrix and matrix y (requires y to have at least the dimensions of this). Alias rows to avoid double subscripting, transpose y first and use array ops. A simpler, less efficient version of '*'.
Value parameters
- y
-
the other matrix
Attributes
Compute the 1-norm of this matrix, i.e., the maximum 1-norm of the column vectors. This is useful for comparing matrices (a - b).norm1. (for j <- indices2 yield apply(?, j).norm1).max
Compute the 1-norm of this matrix, i.e., the maximum 1-norm of the column vectors. This is useful for comparing matrices (a - b).norm1. (for j <- indices2 yield apply(?, j).norm1).max
Attributes
- See also
-
en.wikipedia.org/wiki/Matrix_norm
Compute the Frobenius-norm of 'this' matrix, i.e., the square root of the sum of the squared values over all the elements (sqrt (sse)).
Compute the Frobenius-norm of 'this' matrix, i.e., the square root of the sum of the squared values over all the elements (sqrt (sse)).
Attributes
- See also
-
en.wikipedia.org/wiki/Matrix_norm#Frobenius_norm
Compute the square of the Frobenius-norm of this matrix, i.e., the sum of the squared values over all the elements (sse). Σ (indices) { i => apply(i).normSq }
Compute the square of the Frobenius-norm of this matrix, i.e., the sum of the squared values over all the elements (sse). Σ (indices) { i => apply(i).normSq }
Attributes
Return all but the i-th ROW of this matrix as a new independent matrix. usage: x.not(3)
Return all but the i-th ROW of this matrix as a new independent matrix. usage: x.not(3)
Value parameters
- i
-
the row index to exclude
Attributes
Return all but the ROWS in index sequence idx of this matrix as a new independent matrix. usage: x.not(Array (3, 5, 7))
Return all but the ROWS in index sequence idx of this matrix as a new independent matrix. usage: x.not(Array (3, 5, 7))
Value parameters
- idx
-
the index sequence of rows to exclude
Attributes
Return all but the j-th COLUMN of this matrix as a new independent matrix.. usage: x.not(?, 2)
Return all but the j-th COLUMN of this matrix as a new independent matrix.. usage: x.not(?, 2)
Value parameters
- all
-
use the all rows indicator ?
- j
-
the column index to exclude
Attributes
Return the matrix consisting of the reciprocal of each element of this matrix.
Return the matrix consisting of the reciprocal of each element of this matrix.
Attributes
Return a matrix that is in the reverse row order of this matrix.
Return a matrix that is in the reverse row order of this matrix.
Attributes
Set this matrix's i-th ROW to the elements in vector u. May have left-over elements in row unassigned.
Set this matrix's i-th ROW to the elements in vector u. May have left-over elements in row unassigned.
Value parameters
- i
-
the row index
- u
-
the vector value to assign
Attributes
Set all the elements of this ENTIRE matrix to the scalar s.
Set all the elements of this ENTIRE matrix to the scalar s.
Value parameters
- s
-
the scalar value to assign
Attributes
Set all the elements in the j-th COLUMN of this matrix to the scalar s.
Set all the elements in the j-th COLUMN of this matrix to the scalar s.
Value parameters
- j
-
the column index
- s
-
the scalar value to assign
Attributes
Set the k-th DIAGONAL of this matrix to the elements in vector u.
Set the k-th DIAGONAL of this matrix to the elements in vector u.
Value parameters
- k
-
how far above the main diagonal, e.g., (-1, 0, 1) for (sub, main, super)
- u
-
the vector to set the diagonal to
Attributes
Shift the columns this matrix so the rows become diagonals, i,e., move v_ij -> v_i,(i+j). Will produce a upper right and lower left triangles of zeros.
Shift the columns this matrix so the rows become diagonals, i,e., move v_ij -> v_i,(i+j). Will produce a upper right and lower left triangles of zeros.
Attributes
Show how this matrix and matrix y differ, the first element and row that differ.
Show how this matrix and matrix y differ, the first element and row that differ.
Value parameters
- y
-
the other matrix
Attributes
Split the rows from this matrix to form two matrices: one from the rows in idx (e.g., testing set) and the other from rows not in idx (e.g., training set). Note split and split_ produce different row orders.
Split the rows from this matrix to form two matrices: one from the rows in idx (e.g., testing set) and the other from rows not in idx (e.g., training set). Note split and split_ produce different row orders.
Value parameters
- idx
-
the set of row indices to include/exclude
Attributes
Split the rows from this matrix to form two matrices: one from the rows in idx (e.g., testing set) and the other from rows not in idx (e.g., training set). Concise, but less efficient than split.
Split the rows from this matrix to form two matrices: one from the rows in idx (e.g., testing set) and the other from rows not in idx (e.g., training set). Concise, but less efficient than split.
Value parameters
- idx
-
the row indices to include/exclude
Attributes
Log transform this matrix by using math.sqrt.
Log transform this matrix by using math.sqrt.
Attributes
Compute the column standard deviations of this matrix.
Compute the column standard deviations of this matrix.
Attributes
Compute the sum of this matrix, i.e., the sum of all its elements. Σ (indices) { i => Σ (indices2) { j => v(i)(j) }}
Compute the sum of this matrix, i.e., the sum of all its elements. Σ (indices) { i => Σ (indices2) { j => v(i)(j) }}
Attributes
Compute the column sums of this matrix, i.e., the sums for each of its columns.
Compute the column sums of this matrix, i.e., the sums for each of its columns.
Attributes
Compute the row sums of this matrix, i.e., the sums for each of its rows.
Compute the row sums of this matrix, i.e., the sums for each of its rows.
Attributes
Swap (in-place) rows i and k in this matrix.
Swap (in-place) rows i and k in this matrix.
Value parameters
- i
-
the first row in the swap
- k
-
the second row in the swap
Attributes
Swap (in-place) the elements in rows i and k starting from column col.
Swap (in-place) the elements in rows i and k starting from column col.
Value parameters
- col
-
the starting column for the swap
- i
-
the first row in the swap
- k
-
the second row in the swap
Attributes
Swap (in-place) columns j and l in this matrix.
Swap (in-place) columns j and l in this matrix.
Value parameters
- j
-
the first column in the swap
- l
-
the second column in the swap
Attributes
Convert this matrix to a matrix where all the elements have integer values.
Convert this matrix to a matrix where all the elements have integer values.
Attributes
Convert this matrix to the same matrix, i.e., return this matrix.
Convert this matrix to the same matrix, i.e., return this matrix.
Attributes
Convert this matrix to a string.
Convert this matrix to a string.
Attributes
- Definition Classes
-
Any
Compute the trace of this matrix, i.e., the sum of the elements on the main diagonal. Should also equal the sum of the eigenvalues. Σ (indices) { i => v(i)(i) }
Compute the trace of this matrix, i.e., the sum of the elements on the main diagonal. Should also equal the sum of the eigenvalues. Σ (indices) { i => v(i)(i) }
Attributes
- See also
-
Eigen.scala
Transpose this matrix (swap columns <=> rows). Note: new MatrixD (dim2, dim, v.transpose) does not work when a dimension is 0.
Transpose this matrix (swap columns <=> rows). Note: new MatrixD (dim2, dim, v.transpose) does not work when a dimension is 0.
Attributes
Return the negative of this matrix (unary minus).
Return the negative of this matrix (unary minus).
Attributes
Unshift the columns this matrix so the diagonals become rows, i,e., move v_i,(i+j) -> v_ij. Will lose elements in the upper right and lower left triangles.
Unshift the columns this matrix so the diagonals become rows, i,e., move v_i,(i+j) -> v_ij. Will lose elements in the upper right and lower left triangles.
Attributes
Update the ELEMENT in row i, column j of this matrix. usage: x(i, j) = 5
Update the ELEMENT in row i, column j of this matrix. usage: x(i, j) = 5
Value parameters
- i
-
the row index
- j
-
the column index
- s
-
the scalar value to assign
Attributes
Update the elements in the i-th ROW of this matrix. usage: x(i) = u
Update the elements in the i-th ROW of this matrix. usage: x(i) = u
Value parameters
- i
-
the row index
- u
-
the vector to assign
Attributes
Update the elements in the j-th COLUMN of this matrix. usage: x(?, 2) = u
Update the elements in the j-th COLUMN of this matrix. usage: x(?, 2) = u
Value parameters
- all
-
use the all rows indicator ?
- j
-
the column index
- u
-
the vector to assign
Attributes
Update the elements for a given row in the COLUMNS in range jr of this matrix. usage: x(3, 2 until 4) = u
Update the elements for a given row in the COLUMNS in range jr of this matrix. usage: x(3, 2 until 4) = u
Value parameters
- i
-
use row index
- jr
-
the index range of columns to be updated
- u
-
the vector to assign
Attributes
Update the main DIAGONAL of this matrix according to the given scalar. usage: x(?, ?) = 5
Update the main DIAGONAL of this matrix according to the given scalar. usage: x(?, ?) = 5
Value parameters
- d1
-
use the all diagonal elements indicator ?
- d2
-
use the all diagonal elements indicator ?
- s
-
the scalar value to assign
Attributes
Update the main DIAGONAL of this matrix according to the given vector. usage: x(?, ?) = u
Update the main DIAGONAL of this matrix according to the given vector. usage: x(?, ?) = u
Value parameters
- d1
-
use the all diagonal elements indicator ?
- d2
-
use the all diagonal elements indicator ?
- u
-
the vector to assign
Attributes
Return the dim2-by-dim2 upper triangle of this matrix (rest are zero).
Return the dim2-by-dim2 upper triangle of this matrix (rest are zero).
Attributes
Compute the column variances of this matrix.
Compute the column variances of this matrix.
Attributes
Write this matrix to a CSV-formatted text file with name fileName.
Write this matrix to a CSV-formatted text file with name fileName.
Value parameters
- fileName
-
the name of file to hold the data
Attributes
Raise the elements in this matrix to the p-th power (e.g., x~^2 = x *~ x) Being element-wise, x~^2 is not x * x.
Raise the elements in this matrix to the p-th power (e.g., x~^2 = x *~ x) Being element-wise, x~^2 is not x * x.
Value parameters
- p
-
the scalar power
Attributes
Raise this matrix to the p-th power (for some integer p >= 1) using a divide and conquer algorithm and matrix multiplication (x~^^2 = x * x).
Raise this matrix to the p-th power (for some integer p >= 1) using a divide and conquer algorithm and matrix multiplication (x~^^2 = x * x).
Value parameters
- p
-
the power to raise this matrix to