Utilities

Batching

RandomFeatures.Utilities.batch_generatorFunction
batch_generator(
    array::AbstractArray,
    batch_size::Int64;
    dims
) -> Any

produces batched sub-array views of size batch_size along dimension dims.

Note

this creates views not copies. Modifying a batch will modify the original!

source

Matrix Decomposition

RandomFeatures.Utilities.DecompositionType
struct Decomposition{T, M<:(AbstractMatrix), MorF<:Union{AbstractMatrix, LinearAlgebra.Factorization}}

Stores a matrix along with a decomposition T=Factor, or pseudoinverse T=PseInv, and also computes the inverse of the Factored matrix (for several predictions this is actually the most computationally efficient action)

  • full_matrix::AbstractMatrix: The original matrix

  • decomposition::Union{AbstractMatrix, LinearAlgebra.Factorization}: The matrix decomposition, or pseudoinverse

  • inv_decomposition::AbstractMatrix: The matrix decomposition of the inverse, or pseudoinverse

source
RandomFeatures.Utilities.linear_solveFunction
linear_solve(
    d::Decomposition,
    rhs::AbstractArray{<:AbstractFloat, 3},
    ::Type{Factor};
    tullio_threading
) -> Any

Solve the linear system based on Decomposition type

source