Skip to content

Commit

Permalink
version 1.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Keefe Murphy authored and cran-robot committed Jun 21, 2017
1 parent 6c09a45 commit f907241
Show file tree
Hide file tree
Showing 40 changed files with 1,221 additions and 674 deletions.
8 changes: 4 additions & 4 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Package: IMIFA
Type: Package
Date: 2017-05-29
Date: 2017-06-22
Title: Fitting, Diagnostics, and Plotting Functions for Infinite
Mixtures of Infinite Factor Analysers and Related Models
Version: 1.2.1
Version: 1.3.0
Authors@R: c(person("Keefe", "Murphy", email = "keefe.murphy@ucd.ie", role = c("aut", "cre")),
person("Isobel Claire", "Gormley", role = "ctb"),
person("Cinzia", "Viroli", role = "ctb"))
Expand All @@ -19,10 +19,10 @@ Suggests: Rmpfr, gmp, knitr, methods, rmarkdown
RoxygenNote: 6.0.1
VignetteBuilder: knitr
NeedsCompilation: no
Packaged: 2017-05-29 18:06:27 UTC; Keefe
Packaged: 2017-06-21 23:05:49 UTC; Keefe
Author: Keefe Murphy [aut, cre],
Isobel Claire Gormley [ctb],
Cinzia Viroli [ctb]
Maintainer: Keefe Murphy <keefe.murphy@ucd.ie>
Repository: CRAN
Date/Publication: 2017-05-29 21:27:51 UTC
Date/Publication: 2017-06-21 23:21:39 UTC
74 changes: 39 additions & 35 deletions MD5
Original file line number Diff line number Diff line change
@@ -1,47 +1,51 @@
8fbef014b257ab9a86b71d689c541ee1 *DESCRIPTION
95b024647b60e3f9c11b1f5cddb7bb17 *NAMESPACE
391f8dda881be954ca8da43ae7c7a5ea *NEWS.md
be0384a926c98b040e176084bb088478 *R/Diagnostics.R
3ea94817414d18c67901c9849ab91d62 *R/FullConditionals.R
655d03b12cbf713a2a097bb973de74ed *R/Gibbs_FA.R
38026b02c0bdb8a2c40f194d8f125734 *R/Gibbs_IFA.R
c970958719b976dd9e6de080aec22c32 *R/Gibbs_IMFA.R
ec3f3d6624b65257a634a288b8eef0f2 *R/Gibbs_IMIFA.R
d5043fd053925e875f390f7aac7be5ae *R/Gibbs_MFA.R
ebb07e5e8eacdf4ad8a0759b33990073 *R/Gibbs_MIFA.R
117b7b6cca7149d6b75f22f6b0d9dc10 *R/Gibbs_OMFA.R
c85f11bca841e53a725cb0aaea6a226c *R/Gibbs_OMIFA.R
ebd02fe24220a83120fabdeafd357579 *R/IMIFA.R
f0eda2478bc4bfb52f7d7e66c133d02d *R/MainFunction.R
19a73413ced425c3685e7eb9a4958939 *R/PlottingFunctions.R
0cb8c8cd01e93c694eeede23e44434b7 *R/SimulateData.R
518280fc5fdedb5c6f448a0d18b152b3 *DESCRIPTION
0047fac4b5c2453d9b0afd9ee250b973 *NAMESPACE
80a41879a45e16dfd227d30a4079311b *NEWS.md
fbd82d61f472e4a76c051f9c50175ef4 *R/Diagnostics.R
4b89229356df76717f2ff700f15dbf68 *R/FullConditionals.R
63376a72809ceb0baa3990d44a8edafd *R/Gibbs_FA.R
c1fc1959cf8c67d4e796d8bfd2f1cb33 *R/Gibbs_IFA.R
e0b97b062fa6fe05f72bd3eeab63b89c *R/Gibbs_IMFA.R
4f1aaa458c28c50a741e7801e875510e *R/Gibbs_IMIFA.R
5f46204afe1252d9f387ee927e83193c *R/Gibbs_MFA.R
adff3bb80797bcd86416a54c45bda19a *R/Gibbs_MIFA.R
dabfc9c8ff6cac826b5ecea8463412f4 *R/Gibbs_OMFA.R
4ffa37dedbdc7b82b213b405025fa66a *R/Gibbs_OMIFA.R
f677e31c954826a66d464e59ad58ddfb *R/IMIFA.R
c757631ab7576b8c6d25b2435a61ba87 *R/MainFunction.R
d79824fa029795fc325c8f368ed6b5ec *R/PlottingFunctions.R
5070d58144279fe7ed1d188382a77188 *R/SimulateData.R
4e1464abd196123142e032a066f9628c *R/data.R
67451aae22ea6399aa7705ac5d0432c1 *README.md
1888491b0f83f4166b5d387d781d75e0 *build/vignette.rds
6deddc586bb3532833f3ffa6652327c3 *data/coffee.rda
34fbecb96149bd96a12e9bdd0dc94f98 *data/olive.rda
906fec5f08c1de15c0dca6ab045a32e1 *inst/doc/IMIFA.R
c1641bafdad997671ab7c2ddd4778804 *inst/doc/IMIFA.Rmd
29255a5d4d5142805aa2d4a2dc59ff9d *inst/doc/IMIFA.html
07473dd71acd068b7a5309b80e066974 *man/G_expected.Rd
cdc3492cb586de9e9289f0da6b13179d *man/G_priorDensity.Rd
e96e63e5bd631174a4f467eab91dadab *man/G_variance.Rd
c3c87f2bc1320d1d273a4c3dd26408e2 *man/IMIFA.Rd
9089df39fde860c767672118c90cfe91 *inst/doc/IMIFA.Rmd
3a28c75df6f3e19cee280b9ca26bf100 *inst/doc/IMIFA.html
67cfaf32d098bf18936c64e60c05e844 *man/G_expected.Rd
a0cb77dec5c8c94d2df661fb6d928c69 *man/G_priorDensity.Rd
67d1aea332b1ce55492ac0eb4cf95ee7 *man/G_variance.Rd
a47919032b7c9433bf6fc7973d9e76c4 *man/IMIFA.Rd
38a51bb77be43b62466cfda64336dee0 *man/Ledermann.Rd
ea98d66316220f2c2c956f9cd24fd632 *man/MGP_check.Rd
3cd8e8dd2131c30fc675a3dfff90c43b *man/PGMM_dfree.Rd
4ccccdc0421273d74d56e172ed301483 *man/Zsimilarity.Rd
8adb98e4697504a5937f19451d08419f *man/PGMM_dfree.Rd
7151ecfc3c5ec73d80f22bc99bdd3201 *man/Procrustes.Rd
76fc1b7fdad59738ffca8cdfe269aa8e *man/Zsimilarity.Rd
0a414a386768243e488b2cc37644e4da *man/coffee.Rd
aa4a739849ca14b52183ec7b5a823d2e *man/get_IMIFA_results.Rd
a54f5eec1b0d2cda89e4f834acda0c4e *man/gumbel_max.Rd
35010a68b88a53f50983dec770c30260 *man/heat_legend.Rd
274e09ab4f05e234c4afd8b29bc4b415 *man/is.posi_def.Rd
a5262c1f6f648adbd5f47c4e48abf26e *man/mat2cols.Rd
9090634ec37d5d035ffde49f221d060b *man/mcmc_IMIFA.Rd
4233f1cda9d481905b21665e04f35d32 *man/get_IMIFA_results.Rd
731d02c05edfdd82be03166026ea499c *man/gumbel_max.Rd
b15dccf7816d92b9beaa3849fcb6ce76 *man/heat_legend.Rd
a27d2b64f0ea460502f9ae3d1345d35a *man/is.cols.Rd
351a5b7f3c125591e38dc579e7fc1972 *man/is.posi_def.Rd
207be28b7553de68c184d61486a1429f *man/mat2cols.Rd
15daf805dfcc1efbf6f99f587f7a57ce *man/mcmc_IMIFA.Rd
66f2ceddb66664646e63803a468d74ca *man/olive.Rd
a6ef83c11ea344659931d42ac3d15c59 *man/plot.Results_IMIFA.Rd
983d339b088d04942786e831742d2b51 *man/plot_cols.Rd
6c430cd112a8df01123f85c98a63ba06 *man/plot_cols.Rd
bfe7d96a2294c66843ca30f9071b97e6 *man/psi_hyper.Rd
c8e01465312349f111bd7d490330b805 *man/rDirichlet.Rd
470011ea7014881b12674be3889d3222 *man/sim_IMIFA_data.Rd
c1641bafdad997671ab7c2ddd4778804 *vignettes/IMIFA.Rmd
27dba6f5d8f11fcbc03698d50c84279d *man/rDirichlet.Rd
91df66c816df4c382a428180b77c49a2 *man/shift_GA.Rd
2b9ea02f5604e35850975e387a8eefa0 *man/sim_IMIFA_data.Rd
9089df39fde860c767672118c90cfe91 *vignettes/IMIFA.Rmd
c52793291f0e0f057c961e4b45f446f2 *vignettes/res_olive_IMIFA__Edited-Vignette-only-Version.rda
4 changes: 4 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,22 @@ S3method(summary,Results_IMIFA)
export(G_expected)
export(G_priorDensity)
export(G_variance)
export(Ledermann)
export(MGP_check)
export(PGMM_dfree)
export(Procrustes)
export(Zsimilarity)
export(get_IMIFA_results)
export(gumbel_max)
export(heat_legend)
export(is.cols)
export(is.posi_def)
export(mat2cols)
export(mcmc_IMIFA)
export(plot_cols)
export(psi_hyper)
export(rDirichlet)
export(shift_GA)
export(sim_IMIFA_data)
import(graphics)
import(stats)
Expand Down
59 changes: 46 additions & 13 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,39 @@
__Infinite Mixtures of Infinite Factor Analysers__
==================================================

# IMIFA v1.3.0 - (_4th release [minor update]: 2017-06-22_)
## New Features
* Added options `"constrained"` & `"single"` to `mcmc_IMIFA`'s `uni.type` argument:
as well as being either diagonal or isotropic (UUU / UUC), uniquenesses can now further be
constrained across clusters (UCU / UCC), with appropriate warnings, defaults, checks,
initialisations, computation of model choice penalties, and plotting behaviour in all 4 cases.
* `mcmc_IMIFA` gains the `tune.zeta` argument, a list of `heat`, `lambda` & `target` parameters, to invoke
diminishing adaptation for tuning the uniform proposal to achieve a target acceptance rate when `alpha`
is learned via Metropolis-Hastings when the Pitman-Yor Process prior is employed for the IM(I)FA models.

## Improvements
* (I)FA models sped up by considering uniquenesses under 1-cluster models as `"constrained"` or `"single"`,
rather than previously `"unconstrained"` or `"isotropic"`, utilising pre-computation and empty assignment.
* Previously hidden functions improved, exported and documented with examples:
`is.cols`, `Ledermann`, `Procrustes` & `shift_GA`.
* `is.posi_def` gains `make` argument, merging it with previously hidden function `.make_posdef`:
Thus the 'nearest' positive-(semi)definite matrix and the usual check can be returned in a single call.
* Sped-up sampling IM(I)FA labels, esp. when 'active' G falls to 1, or the _dependent_ slice-sampler is used:
`log.like` arg. removed from `gumbel_max`; function stands alone, now only stored log-likelihoods computed.
* `psi` argument added to `sim_IMIFA_data` to allow supplying true uniqueness parameter values directly.

## Bug Fixes
* Used `bw="SJ"` everywhere `density` is invoked for plotting (`bw="nrd0"` is invoked if this fails).
* Fixed initialisation of uniquenesses for `isotropic` (I)FA models.
* Fixed parallel coordinates plot axes and labels for all `isotropic` uniquenesses plots.
* Fixed adaptation for MIFA/OMIFA/IMIFA models when all clusters simultaneously have zero factors.
* Fixed storage bug in IM(I)FA models when `learn.d` is `TRUE` but `learn.alpha` is `FALSE`.
* Fixed density plot for `discount` when mutation rate is too low (i.e. too many zeros).
* Fixed simulation of loadings matrices for empty MIFA/OMIFA/IMIFA clusters using `byrow=TRUE`:
loop to simulate loadings matrices now generally faster also for all models.
* Fixed silly error re: way in which (I)FA models are treated as 1-cluster models to ensure they run:
Related bug fixed for OM(I)FA/IM(I)FA models when starting number of clusters is actually supplied.

# IMIFA v1.2.1 - (_3rd release [patch update]: 2017-05-29_)
## Improvements
* Posterior mean scores can now also be plotted in the form of a heat map (previously loadings only).
Expand All @@ -23,46 +56,46 @@ __Infinite Mixtures of Infinite Factor Analysers__
* Learning the Pitman-Yor `discount` & `alpha` parameters via Metropolis-Hastings now implemented.
Plotting function's `param` argument gains the option `discount` for posterior inference.
* Sped up simulating cluster labels from unnormalised log probabilities using the Gumbel-Max trick (Yellott, 1977):
`gumbel_max` replaces earlier function to sample cluster labels & is now unhidden/exported/documented.
* Added new plot when `plot.meth=GQ` for OM(I)FA/IM(I)FA methods depicting trace(s) of #s of active/non-empty groups.
`gumbel_max` replaces earlier function to sample cluster labels and is now unhidden/exported/documented.
* Added new plot when `plot.meth=GQ` for OM(I)FA/IM(I)FA models depicting trace of #s of active/non-empty clusters.
* Added function `Zsimilarity` to summarise posterior clustering by the sampled labels with minimum
squared distance to a sparse similarity matrix constructed by averaging the adjacency matrices.
When optionally called inside `get_IMIFA_results`, the similarity matrix can be plotted via `plot.meth="zlabels"`.
squared distance to a sparse similarity matrix constructed by averaging the adjacency matrices:
when optionally called inside `get_IMIFA_results`, the similarity matrix can be plotted via `plot.meth="zlabels"`.

## Improvements
* Metropolis-Hastings updates implemented for `alpha` when `discount` is non-zero, rather than usual Gibbs.
Mutation rate monitored rather than acceptance rate for Metropolis-Hastings updates of `discount` parameter.
* Fixed calculation of # 'free' parameters for `aic.mcmc` & `bic.mcmc` criteria when uniquenesses are isotropic:
* Fixed calculation of # '_free_' parameters for `aic.mcmc` & `bic.mcmc` criteria when uniquenesses are isotropic:
`PGMM_dfree`, which calculates # 'free' parameters for _finite_ factor analytic mixture models is exported/documented.
This function is also used to add checks on the Dirichlet hyperparameter for OM(I)FA methods.
* DIC model selection criterion now also available for infinite factor models (previously finite only).
* `G_priorDensity` now better reflects discrete nature of the density, and plots for non-zero PY discount values.
* Posterior mean loadings heatmaps now also display a colour key legend via new function `heat_legend`.
* Avoided redundant simulation of stick-breaking/mixing proportions under both types of IM(I)FA slice sampler.
* Simulated (finite) mixing proportions w/ _Gamma(alpha, 1)_ trick (Devroye 1986, p.594) instead of `MCMCpack:rdirichlet`:
`rDirichlet` replaces earlier function to sample mixing proportions & is now unhidden/exported/documented.
`rDirichlet` replaces earlier function to sample mixing proportions and is now unhidden/exported/documented.
* Deferred setting `dimnames` attributes in `mcmc_IMIFA` to `get_IMIFA_results`: lower memory burden/faster simulations.
* Jettisoned superfluous duplicate material in object outputted from `get_IMIFA_results` to reduce size/simplify access.
* IMFA/IMIFA `trunc.G` arg, the max allowable # active groups, defaults to `range.G` & # active groups now stored.
* Code sped up when G=1 by not simulating labels for OM(I)FA/IM(I)FA & not simulating mixing proportions for OM(I)FA.
* IMFA/IMIFA `trunc.G` arg, the max allowable # active clusters, defaults to `range.G` and # active clusters now stored.
* Code sped up when `active` G=1 by not simulating labels for IM(I)FA models.
* Reduced chance of crash by exceeding memory capacity; `score.switch` defaults to `FALSE` if # models ran is large.

## Bug Fixes
* 2<sup>nd</sup> IM(I)FA label switching move sped up/properly weighted to ensure uniform sampling of neighbouring cluster pairs.
* Offline label switching square assignment correction now permutes properly.
* Fixed factor score trace plots by extracting indices of stored samples using `Rfast::sort_unique` & rotating properly.
* Fixed factor score trace plots by extracting indices of stored samples using `Rfast::sort_unique` and rotating properly.
* Fixed adding of `rnorm` columns to scores matrix during adaptation, esp. when widest loadings matrix grows/shrinks.
* Fixed initialisation (& upper limit) of number of clusters for OM(I)FA/IM(I)FA, esp. when `N < P`.
* Updates of DP/PY `alpha` parameter now correctly depend on current # non-empty rather than active groups.
* Fixed initialisation (and upper limit) of number of clusters for OM(I)FA/IM(I)FA, esp. when `N < P`.
* Updates of DP/PY `alpha` parameter now correctly depend on current # non-empty rather than active clusters.
* Fixed density plots for parameters with bounded support, accounting for spike at zero for `discount`.
* Slightly rearranged order Gibbs updates take place, esp. to ensure means enter simulation of uniquenesses properly.
* Edited/robustified subsetting of large objects when storing `mcmc_IMIFA` output.
* Tightened controls for when certain parameters are not stored for posterior inference.
* Edited Ledermann upper bound `stop(...)` for finite factor models to `warning(...)`.
* Geometric rather than arithmetic mean used in derivation of single rate hyperparameter for PPCA's isotropic uniquenesses.
* Geometric rather than arithmetic mean used to derive single rate hyperparameter for PPCA's isotropic uniquenesses.
* Uniquenesses now stored correctly for all clustering methods.
* Indices of uncertain obs. returned (`get_IMIFA_results`)/printed (`plot.Results_IMIFA`) even when `zlabels` not supplied.
* Fixed behaviour of progress bar when `verbose=FALSE`.
* Fixed typos & expanded/clarified help documentation/vignette.
* Fixed typos and expanded/clarified help documentation/vignette.

# IMIFA v1.1.0 - (_1st release: 2017-02-02_)

0 comments on commit f907241

Please sign in to comment.