Full API

API

LDA(X, Y; Factors = 1)

Compute's a LinearDiscriminantAnalysis transform from x with a user specified number of latent variables(Factors). Returns an LDA object.

source
( model::LDA )( Z; Factors = length(model.Values) )

Calling a LDA object on new data brings the new data Z into the LDA basis.

source
PCA(X; Factors = minimum(size(X)) - 1)

Compute's a PCA from x using LinearAlgebra's SVD algorithm with a user specified number of latent variables(Factors). Returns a PCA object.

source
(T::PCA)(Z::Array; Factors = length(T.Values), inverse = false)

Calling a PCA object on new data brings the new data Z into or out of (inverse = true) the PCA basis.

source
ExplainedVariance(lda::LDA)

Calculates the explained variance of each singular value in an LDA object.

source
ExplainedVariance(PCA::PCA)

Calculates the explained variance of each singular value in a pca object.

source
PCA_NIPALS(X; Factors = minimum(size(X)) - 1, tolerance = 1e-7, maxiters = 200)

Compute's a PCA from x using the NIPALS algorithm with a user specified number of latent variables(Factors). The tolerance is the minimum change in the F norm before ceasing execution. Returns a PCA object.

source
findpeaks( vY; m = 3)

Finds the indices of peaks in a vector vY with a window span of 2m. Original R function by Stas_G:(https://stats.stackexchange.com/questions/22974/how-to-find-local-peaks-valleys-in-a-series-of-data) This version is based on a C++ variant by me.

source