Last updated: 2022-11-28
Checks: 7 0
Knit directory: gsmash/
This reproducible R Markdown analysis was created with workflowr (version 1.7.0). 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(20220606)
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 c05a969. 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: data/poisson_mean_simulation/
Untracked files:
Untracked: analysis/smooth_bursts_benchmark_new.Rmd
Untracked: code/poisson_STM/examples.R
Untracked: code/poisson_STM/my_vag_pois.R
Untracked: code/poisson_STM/splitting_PMF.R
Untracked: figure/
Untracked: output/poisson_mean_simulation/
Untracked: output/poisson_smooth_simulation/
Unstaged changes:
Modified: analysis/index.Rmd
Modified: analysis/normal_mean_penalty_glm_simplified.Rmd
Modified: analysis/overdispersed_splitting.Rmd
Modified: analysis/overdispersed_splitting_nb.Rmd
Modified: analysis/trendfiltering.ipynb
Modified: code/poisson_mean/simulation_summary.R
Modified: code/poisson_smooth/simulation_summary_smooth.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/smooth_heavisine_benchmark_new.Rmd
) and HTML
(docs/smooth_heavisine_benchmark_new.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 | c05a969 | DongyueXie | 2022-11-28 | wflow_publish("analysis/smooth_heavisine_benchmark_new.Rmd") |
In this analysis we look at the results from generating data as
\[y_i\sim Poisson(\exp(b_i+\epsilon_i)),\epsilon_i\sim N(0,\sigma^2).\] The \(\exp(b)\) is smooth and has block structures as follows:
library(tidyverse)
── Attaching packages ─────────────────────────────────────── tidyverse 1.3.2 ──
✔ ggplot2 3.3.6 ✔ purrr 0.3.5
✔ tibble 3.1.8 ✔ dplyr 1.0.10
✔ tidyr 1.2.1 ✔ stringr 1.4.1
✔ readr 2.1.3 ✔ forcats 0.5.2
── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
✖ dplyr::filter() masks stats::filter()
✖ dplyr::lag() masks stats::lag()
out = readRDS('output/poisson_smooth_simulation/new_simu/heavi30_n_1024_snr_1_count_size_3.rds')
plot(exp(out$sim_data$b),type='l',ylab='')
We set \(n=1024\), repeat 30 times, and count size \(=max(\exp(b))\in \{3,10,100\}\), and \(snr = var(b)/\sigma^2\in \{1,3\}\).
source('code/poisson_smooth/simulation_summary_smooth.R')
all_methods = names(out$output[[1]]$mse_smooth)
include_methods = c('vst_smooth','lik_exp_logx_nug_top','lik_exp_logx_smooth','split_smashpoi_ndwt','split_smashpoi_dwt','smash_two_step_hetero','smash')
rm_methods = all_methods[!(all_methods%in%include_methods)]
out = readRDS('output/poisson_smooth_simulation/new_simu/heavi30_n_1024_snr_1_count_size_3.rds')
get_mse_mean(out,rm_method = rm_methods)
| | mean| sd|
|:---------------------|---------:|---------:|
|smash_two_step_hetero | 0.0366806| 0.0110842|
|split_smashpoi_ndwt | 0.0422723| 0.0138452|
|vst_smooth | 0.0581054| 0.0173602|
|smash | 0.0647752| 0.0273338|
|split_smashpoi_dwt | 0.0651339| 0.0188502|
|lik_exp_logx_smooth | 0.1772403| 0.0355900|
|lik_exp_logx_nug_top | 0.2017689| 0.0377104|
get_runtime(out,rm_method = rm_methods)
for(method in include_methods){
plot_all_curves(out,method=method)
}
out = readRDS('output/poisson_smooth_simulation/new_simu/heavi30_n_1024_snr_3_count_size_3.rds')
get_mse_mean(out,rm_method = rm_methods)
| | mean| sd|
|:---------------------|---------:|---------:|
|smash_two_step_hetero | 0.0297183| 0.0090329|
|smash | 0.0326693| 0.0132566|
|split_smashpoi_ndwt | 0.0458796| 0.0145392|
|split_smashpoi_dwt | 0.0545001| 0.0100757|
|vst_smooth | 0.0667801| 0.0174674|
|lik_exp_logx_smooth | 0.1754551| 0.0348046|
|lik_exp_logx_nug_top | 0.1998395| 0.0375539|
get_runtime(out,rm_method = rm_methods)
for(method in include_methods){
plot_all_curves(out,method=method)
}
out = readRDS('output/poisson_smooth_simulation/new_simu/heavi30_n_1024_snr_1_count_size_10.rds')
get_mse_mean(out,rm_method = rm_methods)
| | mean| sd|
|:---------------------|----------:|---------:|
|split_smashpoi_ndwt | 0.3446270| 0.1015675|
|vst_smooth | 0.4284470| 0.1696302|
|split_smashpoi_dwt | 0.6040073| 0.1379080|
|lik_exp_logx_nug_top | 0.7459868| 0.2049365|
|lik_exp_logx_smooth | 0.7811927| 0.2052191|
|smash_two_step_hetero | 0.7985851| 0.2559179|
|smash | 11.7909645| 2.6279855|
get_runtime(out,rm_method = rm_methods)
for(method in include_methods){
plot_all_curves(out,method=method)
}
out = readRDS('output/poisson_smooth_simulation/new_simu/heavi30_n_1024_snr_3_count_size_10.rds')
get_mse_mean(out,rm_method = rm_methods)
| | mean| sd|
|:---------------------|---------:|---------:|
|split_smashpoi_ndwt | 0.2096114| 0.0421388|
|vst_smooth | 0.2560999| 0.0501611|
|split_smashpoi_dwt | 0.4435668| 0.0920968|
|smash_two_step_hetero | 0.4993140| 0.1054186|
|lik_exp_logx_nug_top | 0.5512705| 0.1341460|
|lik_exp_logx_smooth | 0.5663301| 0.1285966|
|smash | 1.6759409| 0.3911263|
get_runtime(out,rm_method = rm_methods)
for(method in include_methods){
plot_all_curves(out,method=method)
}
out = readRDS('output/poisson_smooth_simulation/new_simu/heavi30_n_1024_snr_1_count_size_100.rds')
get_mse_mean(out,rm_method = rm_methods)
| | mean| sd|
|:---------------------|-----------:|----------:|
|lik_exp_logx_nug_top | 49.76642| 19.91295|
|split_smashpoi_ndwt | 68.86999| 29.54272|
|lik_exp_logx_smooth | 80.83753| 35.60306|
|split_smashpoi_dwt | 100.93212| 32.76496|
|smash_two_step_hetero | 192.64378| 69.20541|
|vst_smooth | 675.54436| 889.46255|
|smash | 11016.66856| 3380.65767|
get_runtime(out,rm_method = rm_methods)
for(method in include_methods){
plot_all_curves(out,method=method)
}
out = readRDS('output/poisson_smooth_simulation/new_simu/heavi30_n_1024_snr_3_count_size_100.rds')
get_mse_mean(out,rm_method = rm_methods)
| | mean| sd|
|:---------------------|----------:|----------:|
|lik_exp_logx_nug_top | 21.22305| 7.687475|
|split_smashpoi_ndwt | 29.62008| 11.014772|
|lik_exp_logx_smooth | 34.29699| 13.862104|
|split_smashpoi_dwt | 41.18045| 12.447188|
|vst_smooth | 43.59580| 16.642956|
|smash_two_step_hetero | 82.12472| 24.054560|
|smash | 1482.29465| 202.844377|
get_runtime(out,rm_method = rm_methods)
for(method in include_methods){
plot_all_curves(out,method=method)
}
sessionInfo()
R version 4.2.1 (2022-06-23)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 20.04.5 LTS
Matrix products: default
BLAS: /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.9.0
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.9.0
locale:
[1] LC_CTYPE=C.UTF-8 LC_NUMERIC=C LC_TIME=C.UTF-8
[4] LC_COLLATE=C.UTF-8 LC_MONETARY=C.UTF-8 LC_MESSAGES=C.UTF-8
[7] LC_PAPER=C.UTF-8 LC_NAME=C LC_ADDRESS=C
[10] LC_TELEPHONE=C LC_MEASUREMENT=C.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] forcats_0.5.2 stringr_1.4.1 dplyr_1.0.10 purrr_0.3.5
[5] readr_2.1.3 tidyr_1.2.1 tibble_3.1.8 ggplot2_3.3.6
[9] tidyverse_1.3.2 workflowr_1.7.0
loaded via a namespace (and not attached):
[1] Rcpp_1.0.9 lubridate_1.9.0 getPass_0.2-2
[4] ps_1.7.1 assertthat_0.2.1 rprojroot_2.0.3
[7] digest_0.6.29 utf8_1.2.2 plyr_1.8.7
[10] R6_2.5.1 cellranger_1.1.0 backports_1.4.1
[13] reprex_2.0.2 evaluate_0.17 highr_0.9
[16] httr_1.4.4 pillar_1.8.1 rlang_1.0.6
[19] readxl_1.4.1 googlesheets4_1.0.1 rstudioapi_0.14
[22] whisker_0.4 callr_3.7.2 jquerylib_0.1.4
[25] rmarkdown_2.17 labeling_0.4.2 googledrive_2.0.0
[28] munsell_0.5.0 broom_1.0.1 compiler_4.2.1
[31] httpuv_1.6.6 modelr_0.1.9 xfun_0.33
[34] pkgconfig_2.0.3 htmltools_0.5.3 tidyselect_1.2.0
[37] fansi_1.0.3 crayon_1.5.2 withr_2.5.0
[40] tzdb_0.3.0 dbplyr_2.2.1 later_1.3.0
[43] grid_4.2.1 jsonlite_1.8.2 gtable_0.3.1
[46] lifecycle_1.0.3 DBI_1.1.3 git2r_0.30.1
[49] magrittr_2.0.3 scales_1.2.1 cli_3.4.1
[52] stringi_1.7.8 cachem_1.0.6 farver_2.1.1
[55] reshape2_1.4.4 fs_1.5.2 promises_1.2.0.1
[58] xml2_1.3.3 bslib_0.4.0 ellipsis_0.3.2
[61] generics_0.1.3 vctrs_0.4.2 tools_4.2.1
[64] glue_1.6.2 hms_1.1.2 processx_3.7.0
[67] fastmap_1.1.0 yaml_2.3.5 timechange_0.1.1
[70] colorspace_2.0-3 gargle_1.2.1 rvest_1.0.3
[73] knitr_1.40 haven_2.5.1 sass_0.4.2