Python is now initialised when a greta_array
is created (#468).
head and tail S3 methods for greta_array
are now consistent with head and tail methods for R versions 3 and 4 (#384).
greta_mcmc_list
objects (returned by mcmc()
) are now no longer modified by operations (like code::gelman.diag()).
joint distributions of uniform variables now have the correct constraints when sampling (#377).
array-scalar dispatch with 3D arrays is now less buggy (#298).
greta now provides R versions of all of R’s primitive functions (I think), to prevent them from silently not executing (#317).
Uses Sys.unsetenv("RETICULATE_PYTHON")
in .onload
on package startup, to prevent an issue introduced with the latest version of RStudio where they do not find the current version of RStudio. See #444 for more details.
Internal change to code to ensure future
continues to support parallelisation of chains. See #447 for more details.
greta
now depends on future
version 1.22.1, tensorflow
(the R package) 2.7.0, and parallelly
1.29.0. This should see no changes on the user side.
Now depends on R >= 3.1.0 (#386)
chol2inv.greta_array()
now warns user about LINPACK argument being ignored, and also reminds user it has been deprecated since R 3.1
calculate()
now accepts multiple greta arrays for which to calculate values, via the ...
argument. As a consequence any other arguments must now be named.
a number of optimiser methods are now deprecated, since they will be unavailable when greta moves to using TensorFlow v2.0: powell()
, cg()
, newton_cg()
, l_bfgs_b()
, tnc()
, cobyla()
, and slsqp()
.
dirichlet()
now returns a variable (rather than an operation) greta array, and the graphs created by lkj_correlation()
and wishart()
are now simpler as cholesky-shaped variables are now available internally.
Python dependency installation has been overhauled with the new install_greta_deps()
function (#417).
Adds helper functions for helping installation get to “clean slate” (#443)
calculate()
now enables simulation of greta array values from their priors, optionally conditioned on fixed values or posterior samples. This enables prior and posterior predictive checking of models, and simulation of data.
A simulate()
method for greta models is now also provided, to simulate the values of all greta arrays in a model from their priors.
variable()
now accepts arrays for upper
and lower
, enabling users to define variables with different constraints.
There are three new variable constructor functions: cholesky_variable()
, simplex_variable()
, and ordered_variable()
, for variables with these constraints but no probability distribution.
a new function chol2symm()
- the inverse of chol()
.
mcmc()
, stashed_samples()
, and calculate()
now return objects of class greta_mcmc_list
which inherit from coda
’s mcmc.list
class, but enable custom greta methods for manipulating mcmc outputs, including a window()
function.
mcmc()
and calculate()
now have a trace_batch_size
argument enabling users to trade-off computation speed versus memory requirements when calculating posterior samples for target greta arrays (#236).
Many message, warning, and error prompts have been replaced internally with the {cli} R package for nicer printing. This is a minor change that should result in a more pleasant user experience (#423 #425).
Internally, where sensible, greta
now uses the glue
package to create messages/ouputs (#378).
New FAQ page and updated installation instructions for installing Python dependencies (#424)
This release is predominantly a patch to make greta work with recent versions of TensorFlow and TensorFlow Probability, which were not backward compatible with the versions on which greta previously depended. From this release forward, greta will depend on specific (rather than minimum) versions of these two pieces of software to avoid it breaking if more changes are made to the APIS of these packages.
greta now (only) works with TensorFlow 1.14.0 and TensorFlow Probability 0.7.0 (#289, #290)
behaviour of the pb_update
argument to mcmc()
has been changed slightly to avoid a bad interaction with thinning (#284)
various edits to the documentation to fix spelling mistakes and typos
This is a very large update which adds a number of features and major speed improvements. We now depend on the TensorFlow Probability Python package, and use functionality in that package wherever possible. Sampling a simple model now takes ~10s, rather than ~2m (>10x speedup).
dim<-()
now always rearranges elements in column-major order (R-style, not Python-style)future
package for execution of MCMC chains on remote machines. Note: it is not advised to use future
for parallel execution of chains on the same machine, that is now automatically handled by greta.one_by_one
argument to MCMC can handle serious numerical errors (such as failed matrix inversions) as ‘bad’ samplesextra_samples()
function to continue sampling from a model.calculate()
works on the output of MCMC, to enable post-hoc posterior predictionabind()
, aperm()
, apply()
, chol2inv()
, cov2cor()
, eigen()
, identity()
, kronecker()
, rdist()
, and tapply()
(thanks to @jdyen)greta_array()
opt()
and mcmc()
as objects, with defined tuning parameters. The control
argument to these functions is now defunct.x[2, 3]
, rather than x.6
)plot.greta_model()
now returns a DiagrammeR::grViz
object (thanks to @flyaflya). This is less modifiable, but renders the plot more much consistently across different environments and notebook types. The DiagrammeR
dgr_graph
object use to create the grViz
object is included as an attribute of this object, named "dgr_graph"
.Minor patch to handle an API change in the progress package. No changes in functionality.
calculate()
function to compute the values of greta arrays conditional on provided values for othersimultilogit()
transformchains
argument to model()
forwardsolve()
and backsolve()
colSums()
, rowSums()
, colMeans()
, and rowMeans()
dim<-()
to reshape greta arrayssweep()
now handles greta array STATS
when x
is numeric.internals
object to enable extension packagesAPI changes:
define_model()
, an alias for model()