Skip to content

Consider deprecating DeterministicVariable in favor of Delta distribtions #780

@damonbayer

Description

@damonbayer

I think we can use numpyro.distributions.Delta in all cases where we currently use our own DeterministicVariable, which would reduce the complexity of the codebase.

>>> import jax.numpy as jnp
>>> import numpyro
>>> from pyrenew.deterministic import DeterministicVariable
>>> 
>>> val = jnp.array([1, 2, 3])
>>> det_var = DeterministicVariable("my var", val)
>>> delta_dist = numpyro.distributions.Delta(val)
>>> 
>>> delta_dist.sample(key = None)
Array([1, 2, 3], dtype=int32)
>>> det_var.sample()
Array([1, 2, 3], dtype=int32)

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