WeightedPCA: PCA for heterogeneous quality samples
Documentation for WeightedPCA.
👋 This package provides research code and work is ongoing. If you are interested in using it in your own research, I'd love to hear from you and collaborate! Feel free to write: dahong67@wharton.upenn.edu
Please cite the following paper for this technique:
David Hong, Fan Yang, Jeffrey A. Fessler, Laura Balzano. "Optimally Weighted PCA for High-Dimensional Heteroscedastic Data", 2022. https://arxiv.org/abs/1810.12862
In BibTeX form:
@Misc{hyfb2022owp,
title = "Optimally Weighted PCA for High-Dimensional Heteroscedastic Data",
author = "David Hong and Fan Yang and Jeffrey A. Fessler and Laura Balzano",
year = 2022,
url = "https://arxiv.org/abs/1810.12862",
}Docstrings
WeightedPCA.WeightedPCAWeightedPCA.ComputedWeightsWeightedPCA.InverseVarianceWeightsWeightedPCA.OptimalWeightsWeightedPCA.UniformWeightsWeightedPCA.wpca
WeightedPCA.WeightedPCA — ModuleWeighted PCA module. Provides weighted principal component analysis (PCA) for data with samples of heterogeneous quality (heteroscedastic noise).
WeightedPCA.wpca — Functionwpca(Y, i, weights=UniformWeights())Compute ith principal component of data Y via weighted PCA using weights, i.e., output is the ith eigenvector of the weighted sample covariance Σ_l w[l] Y[l]*Y[l]'. Data Y is a list of matrices (each column is a sample).
Choices for weights
UniformWeights(): uniform weights, i.e.,w[l] = 1[default]InverseVarianceWeights([v]): inverse noise variance weights, i.e.,w[l] = 1/v[l]OptimalWeights([v,λ]): optimal weights for signal with varianceλ, i.e.,w[l] = 1/v[l] * 1/(1+v[l]/λ)
The weights can also be manually set by passing in an AbstractVector{<:Real}.
See also: UniformWeights, InverseVarianceWeights, OptimalWeights.
WeightedPCA.ComputedWeights — TypeComputedWeightsAbstract supertype for weights that are computed from properties of the data.
WeightedPCA.UniformWeights — TypeUniformWeights <: ComputedWeightsUniform weighting, i.e., w[l] = 1. Corresponds to conventional (unweighted) PCA.
WeightedPCA.InverseVarianceWeights — TypeInverseVarianceWeights <: ComputedWeightsInverse noise variance weighting, i.e., w[l] = 1/v[l].
Constructors
InverseVarianceWeights(v=noisevar)for known noise variancesnoisevarInverseVarianceWeights()for unknown noise variances; noise variances will be estimated from data
WeightedPCA.OptimalWeights — TypeOptimalWeights <: ComputedWeightsOptimal weighting, i.e., w[l] = 1/v[l] * 1/(1+v[l]/λ).
Constructors
OptimalWeights(v=noisevar, λ=signalvar)for known noise variancesnoisevarand signal variancesignalvarOptimalWeights(λ=signalvar)for known signal variancesignalvar; noise variances will be estimated from dataOptimalWeights(v=noisevar)for known noise variancesnoisevar; signal variance will be estimated from dataOptimalWeights()for unknown noise and signal variances; noise and signal variances will be estimated from data