Skip to content

Commit

Permalink
staged before release
Browse files Browse the repository at this point in the history
  • Loading branch information
Fradenti committed May 15, 2024
1 parent 9351df7 commit 8c61f60
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 69 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Package: SANple
Type: Package
Title: Fitting Shared Atoms Nested Models via Markov Chains Monte Carlo
Version: 0.1.1
Date: 2023-10-09
Date: 2024-05-13
Authors@R: c(
person("Laura", "D'Angelo", ,"laura.dangelo@live.com",
role = c("aut", "cre", "cph"),
Expand All @@ -27,5 +27,5 @@ Depends:
scales, RColorBrewer
LinkingTo:
Rcpp, RcppArmadillo, RcppProgress
RoxygenNote: 7.2.3
RoxygenNote: 7.3.1
Encoding: UTF-8
13 changes: 5 additions & 8 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
# SANple (development version)
# SANple 0.1.1 (development version)

-futura versione 0.1.1

* Improve efficiency of stick-breaking computation
* Improve initialization of the algorithms
* Changed cpp for loops indexes from int to unsigned int when needed
* ha senso chiamare gli header di tutti ovunque? credo sia questo che renda il pacchetto pesantissimo
* Fixed a bug in the full conditional of the concentration parameter for the observational DP of CAM
* Improved efficiency of stick-breaking computation;
* Improved initialization of the algorithms, streamlined some scripts;
* Changed cpp `for loops` indexes from int to unsigned int when needed;
* Fixed a bug in the full conditional of the concentration parameter for the observational DP of CAM.

# SANple 0.1.0

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

<!-- README.md is generated from README.Rmd. Please edit that file -->

# SANple v0.1.0.9000 <img src="man/figures/sanple_draft.png" align="right" width="120" />
# SANple v0.1.1 <img src="man/figures/sanple_draft.png" align="right" width="120" />

<!-- badges: start -->

Expand All @@ -18,7 +18,7 @@ Commit](https://img.shields.io/github/last-commit/laura-dangelo/SANple)](https:/
The goal of SANple is to estimate Bayesian nested mixture models via
MCMC methods. Specifically, the package implements the common atoms
model (Denti et al., 2023), its finite version (D’Angelo et al., 2023),
and a hybrid finite-infinite model (D’Angelo and Denti, 2023+). All
and a hybrid finite-infinite model (D’Angelo and Denti, 2024+). All
models use Gaussian mixtures with a normal-inverse-gamma prior
distribution on the parameters. Additional functions are provided to
help analyzing the results of the fitting procedure.
Expand Down Expand Up @@ -95,7 +95,7 @@ D’Angelo, L., Canale, A., Yu, Z., Guindani, M. (2023). Bayesian
nonparametric analysis for the detection of spikes in noisy calcium
imaging data. *Biometrics* 79(2), 1370–1382.

D’Angelo, L., and Denti, F. (2023+). A finite-infinite shared atoms
D’Angelo, L., and Denti, F. (2024+). A finite-infinite shared atoms
nested model for the Bayesian analysis of large grouped data sets.
*Working paper*, 1–23.

Expand Down
46 changes: 9 additions & 37 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,13 @@
Please note this is a resubmission of this package to CRAN.
## SANple 0.1.1

Thank you for checking our package. After the inspection, we were notified of the following:
In this release

* Please do not start the description with "This package", package name, title or similar.
* we improved efficiency of stick-breaking computation;
* we improved initialization of the algorithms, and streamlined some scripts;
* we changed cpp `for loops` indexes from int to unsigned int when needed;
* we fixed a bug in the full conditional of the concentration parameter for the observational DP of CAM.

The new incipit in the description is: "Estimate Bayesian nested mixture models via Markov Chain Monte Carlo methods.[...]".

* Please add some form of linking to your references.

We added the links for the papers we mentioned.

* Please always explain all acronyms in the description text. -> MCMC

Done.

* Please call the on.exit() functions right after defining 'oldpar' and change the option only afterwards.

We corrected the code as requested.

* Please unwrap the examples if that is feasible and if they can be
executed in < 5 sec for each Rd file or create additionally small toy
examples to allow automatic testing.

All the old examples have been reduced and are now testable. On our machines, the tests took less than a second to run.

## R CMD check results

Expand All @@ -35,30 +20,17 @@ All the old examples have been reduced and are now testable. On our machines, th
❯ checking CRAN incoming feasibility ... NOTE
Maintainer: ‘Laura D'Angelo <laura.dangelo@live.com>’

New submission

and

Found the following (possibly) invalid DOIs:
Found the following (possibly) invalid DOIs:
DOI: 10.1080/01621459.2021.1933499
From: DESCRIPTION
Status: Forbidden
Message: 403
DOI: 10.1111/biom.13626
From: DESCRIPTION
Status: Forbidden
Message: 403


However, the links work when building the documentation.

- Running `devtools::check_win_devel()` produces

0 errors | 0 warnings | 1 note

* checking CRAN incoming feasibility ... NOTE
Maintainer: 'Laura D'Angelo <laura.dangelo@live.com>'

New submission
0 errors | 0 warnings | 0 note

- Finally, in its current state, this package also passes all the standard checks performed via *GitHub actions*.

Expand Down
19 changes: 0 additions & 19 deletions src/funs_cam.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,25 +34,6 @@ arma::vec stick_breaking(arma::vec beta_var)
return(out) ;
}

/* older version - to be removed
arma::vec stick_breaking(arma::vec beta_var)
{
int len = beta_var.n_elem ;
arma::vec out(len) ;
out(0) = beta_var(0) ;
for(int k = 1; k < len; k++)
{
arma::vec tmp(k) ;
for(int t = 0; t < k; t++) { tmp(t) = log(1 - beta_var(t)) ; }
double tmp1 = arma::accu(tmp) ;
if(!arma::is_finite(tmp1)) { tmp1 = log(0) ;}
out(k) = exp(log(beta_var(k)) + tmp1) ;
}
return(out) ;
}
*/


// This function performs steps 1-4 of Algorithm 1 of Denti et al. (2021):
// - sample observational and distributional slice variables,
Expand Down

0 comments on commit 8c61f60

Please sign in to comment.