Skip to content

Log Weights #489

@cscherrer

Description

@cscherrer

StatsBase has several options for Weight Vectors. In many applications, we prefer to work in terms of (up-to-additive-constant) log-probabilities, or "LogWeights". Among other benefits, this has the advantage of preventing underflow.

For sampling, there's a well-known "Gumbel-max trick" that is simple, and faster than exponentiation followed by alias sampling. And a "Gumbel-softmax trick" has found applications in inference.

I'll be rolling my own version of this for now, and I'll try to make the interface consistent with StatsBase's. Just leaving this note here in hope of getting this into StatsBase once it's all working.

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