-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Hierarchical dispersion added to other-bucket model #53
base: otherbucket
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a few minor comments/suggestions but overall looks great. the only major issue is the sample2_x noted.
looking at this again i feel we should revisit the many normal(0,1) priors. going to put this on my list for the weekend
corrected_phis = exp(corrected_phis); | ||
|
||
for (s in 1:S2) | ||
corrected_phis2[s] = log_global_phi_scale + log_gene_phi + log_sample2_scale[s] + log(celltype_scale * sample_x[s]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should probably be sample2_x
corrected_phis2 = exp(corrected_phis2); | ||
|
||
for(g in 1:G) | ||
ones[g] = 1; // initialize a vector of all ones (for dirichlet prior) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could be in transformed data block
vector[C] theta_tmp; // temporary predictor for cell-gene-specific expression level | ||
theta_coefs_per_gene[g] ~ normal(0, 1); | ||
theta_tmp = theta_mu + cell_features*theta_coefs[g]; | ||
theta[g] ~ multi_normal_cholesky(theta_tmp, diag_pre_multiply(Omega_sigma, Omega_L)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should prob do diag_pre_multiply
part outside of the for (g in 1:G)
loop. computing this for every gene could get expensive.
for (g in 1:G) { | ||
vector[C] theta_tmp; // temporary predictor for cell-gene-specific expression level | ||
theta_coefs_per_gene[g] ~ normal(0, 1); | ||
theta_tmp = theta_mu + cell_features*theta_coefs[g]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also, appears that this is the cell features model ?!
|
||
for (s in 1:S) | ||
corrected_phis[s] = log_global_phi_scale + log_gene_phi + log_sample_scale[s] + log(celltype_scale * sample_x[s]); | ||
corrected_phis = exp(corrected_phis); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i have more often seen this done by using a temp variable within the loop & declaring the corrected_phis
using a constraint for clarity. but i like the clarity here .. fine with me.
No description provided.