ML Community Day is November 9! Join us for updates from TensorFlow, JAX, and more Learn more

tfp.experimental.distributions.IncrementLogProb

A distribution-like object for an unnormalized measure on a singleton set.

IncrementLogProb is a distribution-like class that represents a "factor", which can also be thought of as a measure of the given size on a sample space consisting of a single element. Its raison d'être is to provide a computed offset to the log probability of a JointDistribution. A JointDistribution containing an IncrementLogProb still represents a measure, but that measure is no longer in general a probability measure (i.e., the probability may no longer integrate to 1).

Even though sampling from any measure represented by IncrementLogProb is information-free, IncrementLogProb retains a sample method for API compatibility with other Distributions. This sample method returns a (batch) shape-[0] Tensor with the same dtype as the increment_log_prob argument provided originally.

log_prob_increment Float Tensor or callable returning a float Tensor. Log probability/density to increment by.
validate_args This argument is ignored, but is present because it is used in certain situations where Distributions are expected.
allow_nan_stats This argument is ignored, but is present because it is used in certain situations where Distributions are expected.
reparameterization_type This argument is ignored, but is present because it is used in certain situations where Distributions are expected.
log_prob_ratio_fn Optional callable with signature (p_kwargs, q_kwargs) -> log_prob_ratio, used to implement a custom p_log_prob_increment - q_log_prob_increment computation.
name Python str name prefixed to Ops created by this class.
**kwargs Passed to log_prob_increment if it is callable.

allow_nan_stats

batch_shape

dtype

event_shape

experimental_shard_axis_names The list or structure of lists of active shard axis names.
log_prob_increment

name

parameters

reparameterization_type

validate_args

Methods

batch_shape_tensor

View source

Shape of a single sample from a single event index as a 1-D Tensor.

The batch dimensions are indexes into independent, non-identical parameterizations of this distribution.

Args
name name to give to the op

Returns
batch_shape Tensor.

event_shape_tensor

View source

Shape of a single sample from a single batch as a 1-D int32 Tensor.

Args
name name to give to the op

Returns
event_shape Tensor.

experimental_default_event_space_bijector

View source

log_prob

View source

Log probability mass function.

sample

View source

unnormalized_log_prob

View source