Last updated: 2025-11-13

Checks: 2 0

Knit directory: misc/

This reproducible R Markdown analysis was created with workflowr (version 1.7.1). The Checks tab describes the reproducibility checks that were applied when the results were created. The Past versions tab lists the development history.


Great! Since the R Markdown file has been committed to the Git repository, you know the exact version of the code that produced these results.

Great! You are using Git for version control. Tracking code development and connecting the code version to the results is critical for reproducibility.

The results in this page were generated with repository version 9109018. See the Past versions tab to see a history of the changes made to the R Markdown and HTML files.

Note that you need to be careful to ensure that all relevant files for the analysis have been committed to Git prior to generating the results (you can use wflow_publish or wflow_git_commit). workflowr only checks the R Markdown file, but you know if there are other scripts or data files that it depends on. Below is the status of the Git repository when the results were generated:


Ignored files:
    Ignored:    .Rhistory
    Ignored:    .Rproj.user/

Untracked files:
    Untracked:  analysis/ica_vs_flash_r1_update_2.Rmd
    Untracked:  analysis/preemble.tex

Unstaged changes:
    Deleted:    analysis/ica_vs_flash_r1_update.Rmd

Note that any generated files, e.g. HTML, png, CSS, etc., are not included in this status report because it is ok for generated content to have uncommitted changes.


These are the previous versions of the repository in which changes were made to the R Markdown (analysis/index.Rmd) and HTML (docs/index.html) files. If you’ve configured a remote Git repository (see ?wflow_git_remote), click on the hyperlinks in the table below to view the files as they were in that past version.

File Version Author Date Message
Rmd 9109018 junmingguan 2025-11-13 wflow_publish(c("analysis/ica_vs_flash_r1_update_1.Rmd", "analysis/index.Rmd"))
html aec07da junmingguan 2025-11-08 Build site.
Rmd e4eb50a junmingguan 2025-11-08 Publish the initial files for ICA vs flashier
Rmd aaa922a junmingguan 2025-11-08 Start workflowr project.

This repo contains misc exploration.

ICA vs flashier

We want to compare fastICA’s rank-1 update with that of flashier. Matthew previously examined an (example)[https://stephens999.github.io/misc/fastica_02.html] where rank-1 fastICA almost perfectly picks up one column of the true mixing matrix, but flashier does not. Our conjecture is that flashier’s failure arises from an overemphasis on the fit term. We plan to investigate this further and potentially improve flashier’s rank-1 update. More concretely, we posit this following model for an observed data matrix \(\boldsymbol{Y}\in \mathbb{R}^{n\times d}\):

\[ \begin{aligned} \boldsymbol{Y} &= \boldsymbol{M}+ \boldsymbol{\ell f}^\top + \boldsymbol{E} \\ \ell_{i}&\stackrel{iid}{\sim} g_\ell \\ f_{j}&\stackrel{iid}{\sim} g_f \\ E_{ij}&\stackrel{iid}{\sim} \mathcal{N}(0, \sigma^2), \end{aligned} \]

where \(\boldsymbol{M}\in\mathbb{R}^{n\times d}\). We hope that \(\boldsymbol{M}\) can act as a ‘stand-in’ matrix—if one chooses to fit a rank-1 model even if the true signals are of rank>1, \(\boldsymbol{M}\) will capture any remaining true signals without leaking any to the error term.

Objectives

  1. Find a small example in which fastICA works but PCA does not.

  2. In real data, does initializing flashier from fastICA produce better ELBO? Try it on some single cell data set. We should process the dataset in a way (e.g., log+1 transform) such that we can apply fastICA (which doesn’t handle non-negative constraints)

  3. We conjecture that another possible reason why rank-1 flashier fails is the EB component. Try fixing the prior to the true data generating distribution.

  4. Try the following update:

    • Update \(\boldsymbol{\ell}\) and \(\boldsymbol{f}\) by running flashier back fit on \(\boldsymbol{Y}-\boldsymbol{M}\).

    • Update \(\boldsymbol{M}\) by truncated SVD on \(\boldsymbol{Y} - \boldsymbol{\ell f}^\top\).

Analyses