API
CanonicalCorrelationAnalysis(A, B)
Returns a CanonicalCorrelationAnalysis object which contains (U, V, r) from Arrays A and B.
ChemometricsTools.LDA
— Method.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.
ChemometricsTools.LDA
— Method.( model::LDA )( Z; Factors = length(model.Values) )
Calling a LDA object on new data brings the new data Z
into the LDA basis.
ChemometricsTools.PCA
— Method.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.
ChemometricsTools.PCA
— Method.(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.
ChemometricsTools.ExplainedVariance
— Method.ExplainedVariance(lda::LDA)
Calculates the explained variance of each singular value in an LDA object.
ChemometricsTools.ExplainedVariance
— Method.ExplainedVariance(PCA::PCA)
Calculates the explained variance of each singular value in a pca object.
ChemometricsTools.PCA_NIPALS
— Method.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.
ChemometricsTools.findpeaks
— Method.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.