description: A distribution-like object for an unnormalized measure on a singleton set.
View source on GitHub |
A distribution-like object for an unnormalized measure on a singleton set.
tfp.experimental.distributions.IncrementLogProb(
log_prob_increment, validate_args=False, allow_nan_stats=False,
reparameterization_type=tfp.distributions.FULLY_REPARAMETERIZED,
log_prob_ratio_fn=None, name='IncrementLogProb', **kwargs
)
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.
Args | |
---|---|
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 Distribution s are expected.
|
allow_nan_stats
|
This argument is ignored, but is present because it is
used in certain situations where Distribution s are expected.
|
reparameterization_type
|
This argument is ignored, but is present because
it is used in certain situations where Distribution s 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.
|
Attributes | |
---|---|
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
|
batch_shape_tensor
batch_shape_tensor(
name='batch_shape_tensor'
)
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
event_shape_tensor(
name='event_shape_tensor'
)
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
experimental_default_event_space_bijector()
log_prob
log_prob(
_
)
Log probability mass function.
sample
sample(
sample_shape=(), seed=None, name='sample'
)
unnormalized_log_prob
unnormalized_log_prob(
_
)