Skip to main content

mean-conc-beta

Beta distribution parameterized by mean and concentration for bounded continuous action spaces in reinforcement learning.

Install

$ pip install mean-conc-beta

Usage

import torch
from mean_conc_beta import Beta

beta = Beta()

# network output: (batch, num_actions, 2) for raw mean and concentration

params = torch.randn(16, 4, 2, requires_grad = True)

# distribution on (-1, 1)

dist = beta(params)

# sample actions

actions = dist.sample()
actions_reparam = dist.rsample()

# log prob and entropy

log_prob = beta.log_prob(dist, actions)
entropy = beta.entropy(dist)

# behavior cloning with mse loss on mean

expert_actions = torch.rand(16, 4)

pred_mean = beta.mean(params)

bc_loss = (pred_mean - expert_actions).pow(2).mean()
bc_loss.backward()

Citations

@article{Ferrari2004BetaRF,
    title   = {Beta Regression for Modelling Rates and Proportions},
    author  = {Silvia L. P. Ferrari and Francisco Cribari-Neto},
    journal = {Journal of Applied Statistics},
    year    = {2004},
    volume  = {31},
    pages   = {799 - 815}
}
@inproceedings{Chou2017TheBP,
    title   = {The Beta Policy for Continuous Reinforcement Learning},
    author  = {Po-Wei Chou and Daniel Maturana and Sebastian Scherer},
    booktitle = {International Conference on Machine Learning},
    year    = {2017}
}

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mean_conc_beta-0.0.7.tar.gz (7.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mean_conc_beta-0.0.7-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

Details for the file mean_conc_beta-0.0.7.tar.gz.

File metadata

  • Download URL: mean_conc_beta-0.0.7.tar.gz
  • Upload date:
  • Size: 7.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.17

File hashes

Hashes for mean_conc_beta-0.0.7.tar.gz
Algorithm Hash digest
SHA256 4882ed64faf6d4287f5ab3bc9659e9b9375638296ac69830bac19a72d1e30661
MD5 5508976cabad426003895b7aac71d2f9
BLAKE2b-256 8d867f659c19f2e2303c2cd3d02503f7049a41c21b5fbad4a35c9b7bd1a61c08

See more details on using hashes here.

File details

Details for the file mean_conc_beta-0.0.7-py3-none-any.whl.

File metadata

File hashes

Hashes for mean_conc_beta-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 c61c1ea965f3c975bf6300f9dbf45caf82b7654e0764adb72eef4d0e287cf421
MD5 e63cd9cc5ac8fd731365ec7ba94a8fb1
BLAKE2b-256 d71e4c7b916356fc41f0a5f6ec24c2f70d3037bcce45c9d96765ac51d2e35481

See more details on using hashes here.

Release history Release notifications | RSS feed

0.1.4

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

0.0.12

2 files

0.0.11

2 files

0.0.9

2 files

0.0.8

2 files

This release

0.0.7 This release

2 files

0.0.6

2 files

0.0.5

2 files

0.0.4

2 files

0.0.3

2 files

0.0.2

2 files

0.0.1

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page