ExpectationMaximizationPCA.EMPCA!Method
EMPCA!(basis_vecs, scores, μ, data_tmp, weights; use_log, kwargs...)

Performs in-place (modifying basis_vecs, scores, and data_tmp) expectation-maximization principal component analysis (EMPCA) on data_tmp using weights as the weights.

Keyword Arguments

  • use_log::false: whether you want to perform EMPCA on the log of data instead
  • inds::AbstractUnitRange=axes(basis_vecs, 2): which indices of basis_vecs you want to use
  • vec_by_vec::Bool=true: whether you want to perform EMPCA one vector at a time (generally preffered) or all at once
ExpectationMaximizationPCA.EMPCAMethod
EMPCA(μ, n_comp, data, weights; basis_vecs, scores, kwargs...)

Performs expectation-maximization principal component analysis (EMPCA) on data with n_comp basis vectors using weights as the weights. Pre-allocated arrays for basis_vecs, and scores, can be passed via keyword arguments.

ExpectationMaximizationPCA._empca_all_at_once!Method
_empca_all_at_once!(basis_vec, scores, data, weights; niter, kwargs...)

Performs in-place EMPCA, improving all basis vectors and scores with each iteration

Keyword Arguments

  • niter::Int=100: the amount of iterations used
ExpectationMaximizationPCA._empca_vec_by_vec!Method
_empca_vec_by_vec!(basis_vec, scores, data, weights; niter, kwargs...)

Performs in-place EMPCA, finishing one basis vector (and its scores) before moving onto the next

Keyword Arguments

  • niter::Int=100: the amount of iterations used
ExpectationMaximizationPCA._solveMethod
_solve(dm, data, w)

Get optimal score(s) for modeling data with the basis vectors in the design matrix (dm) with weights (w) using generalized least squares (GLS)

ExpectationMaximizationPCA._solve_scores!Method
_solve_scores!(basis_vecs, scores, data, weights)

Fill scores with those that optimally model data with the basis_vecs and weights (w) using generalized least squares (GLS)+

ExpectationMaximizationPCA._solve_scores!Method
_solve_scores!(basis_vec, scores, data, weights)

Fill scores with those that optimally model data with the basis_vec and weights (w) using generalized least squares (GLS)