description: Tangent space of M for a distribution with axis-aligned subspace support.
tfp.experimental.tangent_spaces.AxisAlignedSpace
Tangent space of M for a distribution with axis-aligned subspace support.
Inherits From: TangentSpace
tfp.experimental.tangent_spaces.AxisAlignedSpace(
axis_mask
)
This subclass covers cases where the support of the distribution is
on an axis-aligned subspace, such as lower-triangular matrices. In
this special case we can represent the standard basis of the
subspace with a mask. The subclass is designed to support axis-aligned
injections like the FillTriangular
Bijector
.
Args |
axis_mask
|
Tensor . A bit-mask defining the live dimensions of the space.
|
Methods
View source
transform_coordinatewise(
x, f
)
Same as transform_dimension_preserving
, for a coordinatewise f.
Default falls back to transform_dimension_preserving
, which may
be overridden in subclasses.
Args |
x
|
same as in transform_dimension_preserving .
|
f
|
same as in transform_dimension_preserving .
|
Returns |
density
|
A Tensor representing the density correction of f at x
|
space
|
A TangentSpace representing the tangent to fM at f(x)
|
Raises |
NotImplementedError
|
if the TangentSpace subclass does not implement
transform_dimension_preserving .
|
View source
transform_dimension_preserving(
x, f
)
Same as transform_general
, assuming f goes from Rn to Rn.
Default falls back to transform_general
, which may be overridden
in subclasses.
Args |
x
|
same as in transform_general .
|
f
|
same as in transform_general .
|
Returns |
density
|
A Tensor representing the density correction of f at x
|
space
|
A TangentSpace representing the tangent to fM at f(x)
|
Raises |
NotImplementedError
|
if the TangentSpace subclass does not implement
transform_general .
|
View source
transform_general(
x, f
)
Returns the density correction corresponding to f at x.
Also returns a new TangentSpace
representing the tangent to fM at f(x).
Args |
x
|
Tensor (structure). The point at which to calculate the density.
|
f
|
Bijector or one of its subclasses. The transformation that requires
a density correction based on this tangent space.
|
Returns |
density
|
A Tensor representing the density correction of f at x
|
space
|
A TangentSpace representing the tangent to fM at f(x)
|
Raises |
NotImplementedError
|
if the TangentSpace subclass does not implement
this method.
|
View source
transform_projection(
x, f
)
Same as transform_general
, with f a projection on some coordinates.
Default falls back to transform_general
, which may be overridden
in subclasses.
Args |
x
|
same as in transform_general .
|
f
|
same as in transform_general .
|
Returns |
density
|
A Tensor representing the density correction of f at x
|
space
|
A TangentSpace representing the tangent to fM at f(x)
|
Raises |
NotImplementedError
|
if the TangentSpace subclass does not implement
transform_general .
|