Methods

inner_product(a, b)

Computes the inner product between two arrays of the same length.

Parameters:
NameTypeDescription
aArray | Float64Array

Array a

bArray | Float64Array

Array b

Returns:

The inner product between a and b

poweriteration_n(data, n, x, beta, max_iter, seed) → {Eigenpair}

Computes the n biggest Eigenpair of the Matrix data.

Parameters:
NameTypeDescription
dataMatrix

the data matrix

nint

Number of Eigenvalues / Eigenvectors

xMatrix

Initial Point as 1 times cols Matrix

betanumber

momentum parameter

max_iternumber

maximum number of iterations

seednumber

seed for the random number generator

Returns:

The n Eigenpairs.

Type: 
Eigenpair

qr(A) → {Object}

Computes the QR Decomposition of the Matrix A using Gram-Schmidt process.

Parameters:
NameTypeDescription
AMatrix
Returns:
Type: 
Object

qr_givens(A) → {Object}

Computes the QR Decomposition of the Matrix A with givens rotation.

Parameters:
NameTypeDescription
AMatrix
Returns:
Type: 
Object

qr_householder(A) → {Object}

Computes the QR Decomposition of the Matrix A with householder transformations.

Parameters:
NameTypeDescription
AMatrix
Returns:
Type: 
Object

simultaneous_poweriteration(A, k, parameters) → {Object}

Computes the k biggest Eigenvectors and Eigenvalues from Matrix A with the QR-Algorithm.

Parameters:
NameTypeDescription
AMatrix

The Matrix

kNumber

The number of eigenvectors and eigenvalues to compute.

parametersObject

Object containing parameterization of the simultanious poweriteration method.

Properties
NameTypeAttributesDefaultDescription
max_iterationsNumber<optional>
100

The number of maxiumum iterations the algorithm should run.

seedNumber | Randomizer<optional>
1212

The seed value or a randomizer used in the algorithm.

qrfunction<optional>
qr_gramschmidt

The QR technique to use.

tolNumber<optional>
1e-8

Tolerated error for stopping criteria.

Returns:

the k biggest eigenvectors and eigenvalues of Matrix A.

Type: 
Object

svrg(data, x, beta, epoch, m, s, seed)

Computes the eigenvector of X with an accelerated stochastic power iteration algorithm.

Parameters:
NameTypeDescription
dataMatrix

the data matrix

xMatrix

Initial Point as 1 times cols Matrix

betanumber

momentum parameter

epochnumber

number of epochs

mnumber

epoch length

snumber

mini-batch size

seednumber

seed for the random number generator