Skip to content

Vectorized sampling with DenseEuclideanMetric #444

@ErikQQY

Description

@ErikQQY

Both UnitEuclideanMetric and DiagEuclideanMetric support vectorized sampling, for example, if we have multiple chains n_chains=5, we can directly set metric = DiagEuclideanMetric((D, n_chains)) or metric = DiagEuclideanMetric((D, n_chains)) and use the vectorized routines to complete HMC sampling with these metrics, but there is no such support for DenseEuclideanMetric. While there are some comments in the code base below, which indicate this might be able to be implemented with higher-dimensional tensors, there still would be a lot of work for the current API to do this.

# TODO: make dense mass matrix support matrix-mode parallel
function DenseEuclideanMetric(
M⁻¹::Union{AbstractMatrix{T},AbstractArray{T,3}}
) where {T<:AbstractFloat}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions