pymc-devs/pymc

Implement `entropy` dispatches for distributions

Open

#8.085 geöffnet am 3. Feb. 2026

Auf GitHub ansehen
 (11 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Python (1.902 Forks)batch import
feature requesthelp wantedrequest discussion

Repository-Metriken

Stars
 (7.926 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 11T 6h) (12 gemergte PRs in 30 T)

Beschreibung

Description

#7530 added a helper to compute the closed-form mean of a distribution, and #8084 adds variance.

One last useful helper that pops up in applications is the entropy. It's used in ML as a regularization term (e.g. in reinforment learning models that learn a policy function like DDPG), and can be used to pick priors (e.g. in pz.maxent.

It could be nice to have these around. I'm marking as request discussion because I realize by adding all these different moments and statistics we're going down a bit of a rabbit hole, and maybe someone wants to step in and say stop now.

Contributor Guide