View source: R/hyper_axis_spec.R
| hyper_axis_spec | R Documentation |
Builds a single axis spec for tulpa_hyper_grid(). Carries the candidate
values, the optional log-prior, and the metadata (log-scale, bounds,
refinable flag) that the generic refinement / consistency passes need.
hyper_axis_spec(
name,
grid,
log_prior = NULL,
log_scale = FALSE,
bounds = NULL,
refinable = FALSE,
atom_mass = NULL,
slab_bounds = NULL,
log_prior_coord = c("integration", "natural"),
extend = TRUE
)
## S3 method for class 'tulpa_hyper_axis_spec'
print(x, ...)
name |
Character. Axis label, used as the column name of the grid matrix and in posterior summaries. |
grid |
Numeric vector of length >= 1. The per-axis candidate values (the outer integration nodes on this axis). The full outer grid is the Cartesian product across axes. |
log_prior |
Optional |
log_scale |
Logical. Does the axis live naturally on a log scale
( |
bounds |
Numeric vector of length 2 giving the natural support
|
refinable |
Logical. When |
atom_mass |
Numeric in |
slab_bounds |
Numeric |
log_prior_coord |
One of |
extend |
Logical. On a refinable axis, may the passes place a node
beyond the outermost value in |
x |
A |
... |
Ignored. |
An object of class tulpa_hyper_axis_spec (a validated list with
the fields listed above).
tulpa_hyper_grid().
hyper_axis_spec("sigma", grid = c(0.5, 1, 2), log_scale = TRUE,
bounds = c(0, Inf))
# A zero level on a log-scale axis is a point mass with a declared share:
hyper_axis_spec("alpha", grid = c(0, 0.5, 1), log_scale = TRUE,
bounds = c(0, Inf), atom_mass = 0.5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.