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.2.tar.gz
(5.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mean_conc_beta-0.0.2.tar.gz.
File metadata
- Download URL: mean_conc_beta-0.0.2.tar.gz
- Upload date:
- Size: 5.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.8.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f120a26135f2d358fcf91c8bdb545723fd78aae7215eb78d5f5394d66ca71504
|
|
| MD5 |
e979cf629a0856f601ab0f2cd9d97d7c
|
|
| BLAKE2b-256 |
881c13f45106a3da03bfab1400976059050aedc434583d092413331e8dc1ec96
|
File details
Details for the file mean_conc_beta-0.0.2-py3-none-any.whl.
File metadata
- Download URL: mean_conc_beta-0.0.2-py3-none-any.whl
- Upload date:
- Size: 5.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.8.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
348d436514d189ca665419774c4988cb1071ee17019a7a98b05da2e496c8502a
|
|
| MD5 |
a58c5bf67cf8fdd89c8acb7d27ba29f9
|
|
| BLAKE2b-256 |
de074fe3cdfadb8c226fcc4cc08a0fc7dec15cdee08b29a00db67530c1e0346b
|