<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/probability/blob/v0.25.0/tensorflow_probability/python/experimental/tangent_spaces/symmetric_matrix.py#L26-L73) |

Tangent space of M the space of `n x n` symmetric matrices.

Inherits From: [`TangentSpace`](https://www.tensorflow.org/probability/api_docs/python/tfp/experimental/tangent_spaces/TangentSpace)

## Methods

### `compute_basis`

[View source](https://github.com/tensorflow/probability/blob/v0.25.0/tensorflow_probability/python/experimental/tangent_spaces/symmetric_matrix.py#L29-L46)

    compute_basis(
        x
    )

Compute basis of symmetric matrices.

### `transform_coordinatewise`

[View source](https://github.com/tensorflow/probability/blob/v0.25.0/tensorflow_probability/python/experimental/tangent_spaces/spaces.py#L172-L193)

    transform_coordinatewise(
        x, f, **kwargs
    )

Same as `transform_dimension_preserving`, for a coordinatewise f.

Default falls back to `transform_dimension_preserving`, which may
be overridden in subclasses.

<br />

<br />

<br />

| Args ||
|---|---|
| `x` | same as in `transform_dimension_preserving`. |
| `f` | same as in `transform_dimension_preserving`. |
| `**kwargs` | same as in `transform_dimension_preserving`. |

<br />

<br />

<br />

<br />

| Returns ||
|---|---|
| `log_density` | A `Tensor` representing the log density correction of f at x |
| `space` | A `TangentSpace` representing the tangent to fM at f(x) |

<br />

<br />

<br />

<br />

| Raises ||
|---|---|
| `NotImplementedError` | if the `TangentSpace` subclass does not implement `transform_dimension_preserving`. |

<br />

### `transform_dimension_preserving`

[View source](https://github.com/tensorflow/probability/blob/v0.25.0/tensorflow_probability/python/experimental/tangent_spaces/spaces.py#L123-L143)

    transform_dimension_preserving(
        x, f, **kwargs
    )

Same as `transform_general`, assuming f goes from R\^n to R\^n.

Default falls back to `transform_general`, which may be overridden
in subclasses.

<br />

<br />

<br />

| Args ||
|---|---|
| `x` | same as in `transform_general`. |
| `f` | same as in `transform_general`. |
| `**kwargs` | same as in `transform_general`. |

<br />

<br />

<br />

<br />

| Returns ||
|---|---|
| `log_density` | A `Tensor` representing the log density correction of f at x |
| `space` | A `TangentSpace` representing the tangent to fM at f(x) |

<br />

<br />

<br />

<br />

| Raises ||
|---|---|
| `NotImplementedError` | if the `TangentSpace` subclass does not implement `transform_general`. |

<br />

### `transform_general`

[View source](https://github.com/tensorflow/probability/blob/v0.25.0/tensorflow_probability/python/experimental/tangent_spaces/spaces.py#L98-L118)

    transform_general(
        x, f, **kwargs
    )

Returns the density correction, in log space, corresponding to f at x.

Also returns a new `TangentSpace` representing the tangent to fM at f(x).

<br />

<br />

<br />

| 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. |
| `**kwargs` | Optional keyword arguments as part of the Bijector. |

<br />

<br />

<br />

<br />

| Returns ||
|---|---|
| `log_density` | A `Tensor` representing the log density correction of f at x |
| `space` | A `TangentSpace` representing the tangent to fM at f(x) |

<br />

<br />

<br />

<br />

| Raises ||
|---|---|
| `NotImplementedError` | if the `TangentSpace` subclass does not implement this method. |

<br />

### `transform_projection`

[View source](https://github.com/tensorflow/probability/blob/v0.25.0/tensorflow_probability/python/experimental/tangent_spaces/spaces.py#L148-L167)

    transform_projection(
        x, f, **kwargs
    )

Same as `transform_general`, with f a projection (or its inverse).

Default falls back to `transform_general`, which may be overridden
in subclasses.

<br />

<br />

<br />

| Args ||
|---|---|
| `x` | same as in `transform_general`. |
| `f` | same as in `transform_general`. |
| `**kwargs` | same as in `transform_general`. |

<br />

<br />

<br />

<br />

| Returns ||
|---|---|
| `log_density` | A `Tensor` representing the log density correction of f at x |
| `space` | A `TangentSpace` representing the tangent to fM at f(x) |

<br />

<br />

<br />

<br />

| Raises ||
|---|---|
| `NotImplementedError` | if the `TangentSpace` subclass does not implement `transform_general`. |

<br />