Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

tfb_scale_tri_l

Transforms unconstrained vectors to TriL matrices with positive diagonal


Description

This is implemented as a simple tfb_chain of tfb_fill_triangular followed by tfb_transform_diagonal, and provided mostly as a convenience. The default setup is somewhat opinionated, using a Softplus transformation followed by a small shift (1e-5) which attempts to avoid numerical issues from zeros on the diagonal.

Usage

tfb_scale_tri_l(
  diag_bijector = NULL,
  diag_shift = 1e-05,
  validate_args = FALSE,
  name = "scale_tril"
)

Arguments

diag_bijector

Bijector instance, used to transform the output diagonal to be positive. Default value: NULL (i.e., tfb_softplus()).

diag_shift

Float value broadcastable and added to all diagonal entries after applying the diag_bijector. Setting a positive value forces the output diagonal entries to be positive, but prevents inverting the transformation for matrices with diagonal entries less than this value. Default value: 1e-5.

validate_args

Logical, default FALSE. Whether to validate input with asserts. If validate_args is FALSE, and the inputs are invalid, correct behavior is not guaranteed.

name

name prefixed to Ops created by this class.

Value

a bijector instance.

See Also


tfprobability

Interface to 'TensorFlow Probability'

v0.11.0.0
Apache License (>= 2.0)
Authors
Sigrid Keydana [aut, cre], Daniel Falbel [ctb], Kevin Kuo [ctb] (<https://orcid.org/0000-0001-7803-7901>), RStudio [cph]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.