Last updated: 2020-06-05

Checks: 7 0

Knit directory: ebpmf_data_analysis/

This reproducible R Markdown analysis was created with workflowr (version 1.6.2). 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 job! The global environment was empty. Objects defined in the global environment can affect the analysis in your R Markdown file in unknown ways. For reproduciblity it’s best to always run the code in an empty environment.

The command set.seed(20200511) was run prior to running the code in the R Markdown file. Setting a seed ensures that any results that rely on randomness, e.g. subsampling or permutations, are reproducible.

Great job! Recording the operating system, R version, and package versions is critical for reproducibility.

Nice! There were no cached chunks for this analysis, so you can be confident that you successfully produced the results during this run.

Great job! Using relative paths to the files within your workflowr project makes it easier to run your code on other machines.

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 ac82844. 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/
    Ignored:    analysis/ebpmf_bg_tutorial_cache/
    Ignored:    analysis/pmf_greedy_experiment_cache/

Untracked files:
    Untracked:  analysis/get_topic_words.R
    Untracked:  analysis/pmf_greedy_experiment2.Rmd
    Untracked:  output/uci_BoW/v0.4.2/top_words_K100_v0.4.2.csv
    Untracked:  output/uci_BoW/v0.4.2/top_words_K20_v0.4.2.csv
    Untracked:  output/uci_BoW/v0.4.2/top_words_K50_v0.4.2.csv
    Untracked:  output/uci_BoW/v0.4.2/top_words_v0.4.2.csv

Unstaged changes:
    Modified:   analysis/kos_K20_ebpmf.alpha_v0.4.2.Rmd
    Modified:   analysis/plot_topic_words.R

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/ebpmf.alpha_v0.4.2_summary.Rmd) and HTML (docs/ebpmf.alpha_v0.4.2_summary.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 ac82844 zihao12 2020-06-05 update summary
html 3d40a57 zihao12 2020-06-05 Build site.
Rmd fac805b zihao12 2020-06-05 update summary
html 446473c zihao12 2020-06-05 Build site.
Rmd 278246e zihao12 2020-06-05 update summary
html 0481157 zihao12 2020-06-05 Build site.
Rmd d78c34b zihao12 2020-06-05 ebpmf.alpha_v0.4.2_summary.Rmd
html 68e541a zihao12 2020-06-05 Build site.
Rmd 0da95e9 zihao12 2020-06-05 ebpmf.alpha_v0.4.2_summary.Rmd

What’s new in ebpmf.alpha_v0.4.2

  • Implemented ebpmf_wbg.
  • Implemented a version of greedy pmf. (Would be easy to extend to other models, but I am dubious about its effects).

  • Used a numerical trick to improve stability in computing \(B_{ij}\) (in the link below).
  • Used another way of initialization (only using L). 

Model and implementation details:

ebpmf_wbg & pmf_greedy

Individual data analysis results: 

kos_K20,
greedy_pmf_experiment,
I also show all topics here: topics

More comparisons across different \(K\) and different models

Note that

\[ELBO = E_q(\text{log-lik}) - KL(q || g)\]

    K  ELBO_bg ELBO_wbg    KL_bg   KL_wbg  E_ll_bg E_ll_wbg   ll_pmf
1  20 -1700057 -1690036 151380.3 141562.7 -1548677 -1548473 -1504099
2  50 -1688549 -1681001 232036.2 214114.5 -1456512 -1466886 -1379746
3 100 -1702420 -1681872 313105.3 263899.2 -1389315 -1417972 -1264891

why greedy_pmf may not work?

The rank-1 model for pmfis a mean of row and column, ignoring the structures. This is in contrast to svd type methods (PCA itself is a greedy approach that achieves global optimality: the best rank-K approximation).

TODO:

  • Find a better dataset and run with bigger \(K\) to see if our method has an advantage over pmf + poisson2binom.
  • Try to estimate \(K\). it might be easier to do coordinate update and weed out \(w\) (or accept more moves that propose \(w_k = 0\), to think about it another way), than using greedy approach (\(\lambda^{k}_{ij}\) is a weighted sum of previous \(k-1\) components and the current one).
  • Think about getting rid of some computational difficulty by approximating posterior of \(L, F\) with mixture of normal.

R version 3.5.1 (2018-07-02)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS  10.14

Matrix products: default
BLAS: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRblas.0.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] workflowr_1.6.2

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.4.6    rprojroot_1.3-2 digest_0.6.25   later_0.8.0    
 [5] R6_2.4.1        backports_1.1.7 git2r_0.26.1    magrittr_1.5   
 [9] evaluate_0.14   stringi_1.4.3   fs_1.3.1        promises_1.0.1 
[13] whisker_0.3-2   rmarkdown_2.1   tools_3.5.1     stringr_1.4.0  
[17] glue_1.4.1      httpuv_1.5.1    xfun_0.8        yaml_2.2.0     
[21] compiler_3.5.1  htmltools_0.3.6 knitr_1.28