Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Smc issue 306 #333

Closed
wants to merge 86 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
86 commits
Select commit Hold shift + click to select a range
946c0c9
made a stupid R wrapper
osorensen Oct 20, 2023
d417259
first step done
osorensen Oct 20, 2023
113d5b0
updated news and version
osorensen Oct 20, 2023
2ff1a72
styling
osorensen Oct 20, 2023
961d90c
updated R-CMD-check.yaml to see if it fixes windows failures
osorensen Oct 20, 2023
e23f3dc
Merge branch 'develop' into smc-issue-306
osorensen Oct 23, 2023
51f73a3
Merge branch 'wrapper-issues-327-328' into smc-issue-306
osorensen Oct 23, 2023
f838653
compiled readme
osorensen Oct 23, 2023
7c348b1
changed R_obs to rankings #329
osorensen Oct 23, 2023
14bc172
moved n_users out of Cpp
osorensen Oct 23, 2023
8d32c29
added rho_init
osorensen Oct 23, 2023
a52a8b2
added default alpha_init
osorensen Oct 23, 2023
de9fb65
removed n_items argument from smc_mallows_new_users
osorensen Oct 23, 2023
90be59f
changed Time to timesteps
osorensen Oct 23, 2023
b56cea2
changed N to n_particles
osorensen Oct 23, 2023
1a4a5a3
updated vignette
osorensen Oct 23, 2023
eca77fa
functioning smc_mallows_update for new users
osorensen Oct 23, 2023
44521b0
added update function, #331
osorensen Oct 23, 2023
7683b2b
updated function name in vignette for consistency
osorensen Oct 23, 2023
49b1cab
working on bug fixing
osorensen Oct 23, 2023
6f07932
added an extended test
osorensen Oct 23, 2023
73963b0
updating of correctness test
osorensen Oct 23, 2023
4698657
Merge branch 'users-update-331' into smc-issue-306
osorensen Oct 23, 2023
d63bec6
updated documentation
osorensen Oct 23, 2023
9c227dd
updated vignette
osorensen Oct 23, 2023
f8cceb5
created potato_partial data and removed unnecessary args
osorensen Oct 23, 2023
2c5b64a
removed burnin arg from plot.SMCMallows
osorensen Oct 23, 2023
bace483
moved some new_item_rank stuff to R
osorensen Oct 23, 2023
d5ac41f
introduced SMCMallowsNewUsers class
osorensen Oct 23, 2023
b45b4a7
checking if there is a bug in new_item_rank
osorensen Oct 23, 2023
ed116a7
added update function to new_item_ranks
osorensen Oct 23, 2023
86c714a
fixed bug in updating function and confirmed with long-running test
osorensen Oct 24, 2023
da877f7
started adding test of new_items
osorensen Oct 24, 2023
80c5e24
confirmed with tests that smc_mallows_new_users seems correct for par…
osorensen Oct 25, 2023
3b58dfc
removed updating function for partial rankings because it is not prop…
osorensen Oct 25, 2023
488646a
removed updating of new items
osorensen Oct 25, 2023
e274666
Added stop condition on smc_mallows_update
osorensen Oct 25, 2023
e1a988f
debugging
osorensen Oct 25, 2023
c21b6ec
discovered the bug in smc_mallows_update for partial data and fixed it
osorensen Oct 25, 2023
3805465
added long-running test with sushi data
osorensen Oct 25, 2023
cf9af9b
updated vignette with example
osorensen Oct 25, 2023
1d35652
run-extended styling
osorensen Oct 25, 2023
b4447b1
run-extended updated documentation
osorensen Oct 25, 2023
fbe5dfb
removed unused argument to rmallows #337
osorensen Oct 26, 2023
c8856e9
Merge branch 'develop' of github.com:ocbe-uio/BayesMallows into develop
osorensen Oct 27, 2023
fdee36c
radical refactoring
osorensen Oct 27, 2023
eb7e87c
updated text in vignette about complete rankings
osorensen Oct 27, 2023
42bdc11
added handling of missing data to the updating function
osorensen Oct 27, 2023
95815d8
updated vignette with partial updating
osorensen Oct 27, 2023
a08282f
small improvements
osorensen Oct 30, 2023
5b22c24
removing all old SMC tests, as they need to be re-created
osorensen Nov 1, 2023
525e84e
quite a lot of refactoring done
osorensen Nov 1, 2023
a386fb1
renaming test file
osorensen Nov 2, 2023
83972e7
long-running tests passing for smc new users
osorensen Nov 2, 2023
ca650b3
updated smc tests
osorensen Nov 2, 2023
2b259b9
removed acceptance tracing, as it can easily be computed post-hoc
osorensen Nov 2, 2023
da5a707
pulled n_items out of update_rho
osorensen Nov 2, 2023
3465062
factored away metropolis_hastings_rho
osorensen Nov 2, 2023
2dabf5e
completed removed smc-specific updating fn for rho
osorensen Nov 2, 2023
abc661e
built
osorensen Nov 2, 2023
15b41fd
got rid of alpha_max
osorensen Nov 2, 2023
7ec780c
removed unused arg from update_alpha
osorensen Nov 2, 2023
67191de
factored away smc_metropolis_hastings_alpha
osorensen Nov 2, 2023
123cadd
added long-running test for SMC partial rankings
osorensen Nov 6, 2023
77feafd
simplified MCMC code
osorensen Nov 6, 2023
50c2a5b
factored out augmentation function
osorensen Nov 6, 2023
b108796
got it almost working with uniform augmentation
osorensen Nov 7, 2023
e6cc8e8
working on pseudo proposal
osorensen Nov 7, 2023
6656188
both pseudo and uniform seem to be working well
osorensen Nov 7, 2023
4ba9dc9
refactored fwd and bwd into one
osorensen Nov 7, 2023
956377e
seriously slimming down by reusing
osorensen Nov 7, 2023
479a841
more refactoring
osorensen Nov 8, 2023
7a4bc36
auto-detecting missing ranks as in MCMC
osorensen Nov 8, 2023
b78ca22
removed unnecessary loop in initialize_missing_ranks
osorensen Nov 8, 2023
adc0d50
harmonized name for augmented data
osorensen Nov 8, 2023
a3e91ff
small move in run_mcmc
osorensen Nov 8, 2023
4d89f52
more refactoring
osorensen Nov 8, 2023
f467737
removed unused variable
osorensen Nov 8, 2023
019e163
removed another unused variable
osorensen Nov 8, 2023
96e1a13
initialized norm_wgt
osorensen Nov 8, 2023
b832524
removed unused variable
osorensen Nov 8, 2023
234eeba
fixed bug in MCMC loop in SMC for rank augmentatino
osorensen Nov 8, 2023
bb2fa19
merged proposal functions between MCMC and SMC
osorensen Nov 8, 2023
1a7e950
fixed chunk options in SMC vignette
osorensen Nov 8, 2023
fcd88c8
removed non-running examples
osorensen Nov 8, 2023
4a12f10
fixed rcmdchk
osorensen Nov 8, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
.DS_Store
.Ruserdata
inst/doc
work-docs/
doc
Meta
/doc/
Expand Down
3 changes: 1 addition & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,7 @@ Imports: Rcpp (>= 1.0.0),
relations (>= 0.6-8),
rlang (>= 0.3.1),
HDInterval (>= 0.2.0),
cowplot (>= 1.0.0),
methods
cowplot (>= 1.0.0)
LinkingTo: Rcpp, RcppArmadillo, testthat
Suggests:
R.rsp,
Expand Down
13 changes: 3 additions & 10 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,24 +1,19 @@
# Generated by roxygen2: do not edit by hand

S3method(compute_consensus,BayesMallows)
S3method(compute_consensus,SMCMallows)
S3method(compute_posterior_intervals,BayesMallows)
S3method(compute_posterior_intervals,SMCMallows)
S3method(plot,BayesMallows)
S3method(plot,SMCMallows)
S3method(print,BayesMallows)
S3method(print,BayesMallowsMixtures)
S3method(update_mallows,BayesMallows)
S3method(update_mallows,SMCMallows)
export(assess_convergence)
export(assign_cluster)
export(calculate_backward_probability)
export(calculate_forward_probability)
export(compute_consensus)
export(compute_mallows)
export(compute_mallows_mixtures)
export(compute_posterior_intervals)
export(compute_posterior_intervals_alpha)
export(compute_posterior_intervals_rho)
export(compute_rho_consensus)
export(create_ordering)
export(create_ranking)
export(estimate_partition_function)
Expand All @@ -35,11 +30,9 @@ export(prepare_partition_function)
export(rank_distance)
export(rank_freq_distr)
export(sample_mallows)
export(smc_mallows_new_item_rank)
export(smc_mallows_new_users)
export(update_mallows)
importFrom(Rcpp,sourceCpp)
importFrom(Rdpack,reprompt)
importFrom(methods,is)
importFrom(rlang,.data)
importFrom(stats,aggregate)
importFrom(utils,head)
Expand Down
46 changes: 40 additions & 6 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,51 @@
# BayesMallows (development versions)

## Changes to sequential Monte Carlo methods

* BREAKING CHANGE: "C" argument removed from plot.SMCMallows() since clustering
is currently not supported for these models.
* BREAKING CHANGE: argument "mcmc_kernel_app" renamed to "mcmc_steps", to
better explain what it is doing.
* BREAKING CHANGE: argument "nmc" to plot.SMCMallows has been removed because it
is now a part of the objects of class "SMCMallows", and hence does not need to
be explicitly provided.
* BREAKING CHANGE: argument "burnin" to plot.SMCMallows has been removed because
burnin is not relevant with sequential Monte Carlo.
* BREAKING CHANGE: arguments "timesteps" and "n_items" to
smc_mallows_new_item_rank() have been removed, since they are given by the
dimension of the rankings argument.
* function smc_mallows_update() has been added, which allows updating existing
models as new data arrive.
* BREAKING CHANGE: Argument "N" in SMC Mallows functions has been change to
"n_particles".
* BREAKING CHANGE: Argument "Time" in SMC Mallows functions has been changed to
"timesteps", to better describe what it means.
* BREAKING CHANGE: smc_mallows_new_users() no longer takes the argument
"n_items", as it is given by the number of columns in its "rankings" argument.
* BREAKING CHANGE: Functions smc_mallows_new_users() and
smc_mallows_new_item_rank() are now wrappers in R, which call the underlying
C++ functions. These functions are now able to compute the partition function
automatically, not requiring the user to do this manually. As a consequence,
the argument "cardinalities" has been removed, and the argument
"logz_estimate" has changed its expectation, to be consistent with the use
in compute_mallows().
* BREAKING CHANGE: compute_rho_consensus() for SMC Mallows has been deprecated
in favor of compute_consensus().
* BREAKING CHANGE: compute_posterior_intervals_rho() and compute_posterior_intervals_alpha()
for SMC Mallows have been deprecated in factor of
compute_posterior_intervals() with argument parameter = "rho" and
parameter = "alpha".
* Plot title "Implemented SMC scheme" removed from plot.SMCMallows() with
argument parameter = "alpha".

## Other changes

* Argument obs_freq to internal function rmallows() is removed, as it is not
being used. Thanks to Lorenzo Zuccato for pointing this our
(https://github.com/ocbe-uio/BayesMallows/issues/337).
* Argument save_clus to compute_mallows() has been removed, as it was not used.
* compute_mallows() now supports parallel chains, by providing a 'cl' argument.
See vignette "MCMC with Parallel Chains" for a tutorial.
* compute_rho_consensus() for SMC Mallows has been deprecated in favor of
compute_consensus().
* compute_posterior_intervals_rho() and compute_posterior_intervals_alpha()
for SMC Mallows have been deprecated in factor of
compute_posterior_intervals() with argument parameter = "rho" and
parameter = "alpha".
* Documentation of functions are now grouped in families.
* lik_db_mix() is now deprecated in favor of get_mallows_loglik()
* Unusued argument removed from internal function augment_pairwise(). Thanks to
Expand Down
2 changes: 1 addition & 1 deletion R/BayesMallows.R
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#' \code{\link{estimate_partition_function}}.
#' \item For sequential Monte Carlo algorithms developed in
#' \insertCite{steinSequentialInferenceMallows2023;textual}{BayesMallows}, see
#' \code{\link{smc_mallows_new_users}} and \code{\link{smc_mallows_new_item_rank}}.
#' \code{\link{update_mallows}}.
#' }
#'
#'
Expand Down
Loading
Loading