# TorchLikelihoods
A library for handling likelihoods in PyTorch for any type of data
## Installation
Run the following to install
```
pip install torchlikelihoods
```
## Usage
```python
from torchlikelihoods import NormalLikelihood
import torch
num_samples, num_feats = 100, 5
normal_data = torch.randn((num_samples, num_feats))
lik = NormalLikelihood(domain_size=num_feats)
scaler = lik.get_scaler()
print(f"Domain size: {lik.domain_size()}")
print(f"Params size: {lik.params_size()}")
```
## Do you want to get involved in the development?
```bash
pip install -e .[dev]
```
### Testing
To run the tests:
```bash
make test
pytest
```
Raw data
{
"_id": null,
"home_page": "https://github.com/psanch21/torchlikelihoods",
"name": "torchlikelihoods",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": "",
"keywords": "Distributions,Likelihoods,Heterogeneous Data,Pytorch,Scalers",
"author": "Pablo Sanchez Martin",
"author_email": "psanch2103@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/18/15/9cd3958c2c43166923e651b227ff02e954a51c2c7c0e3e5eeaa7f6ec2c4b/torchlikelihoods-0.0.6.4.tar.gz",
"platform": null,
"description": "# TorchLikelihoods\n\nA library for handling likelihoods in PyTorch for any type of data\n\n\n\n## Installation\n\nRun the following to install\n\n```\npip install torchlikelihoods\n```\n\n## Usage\n\n```python\nfrom torchlikelihoods import NormalLikelihood\nimport torch\n\nnum_samples, num_feats = 100, 5\nnormal_data = torch.randn((num_samples, num_feats))\n\nlik = NormalLikelihood(domain_size=num_feats)\n\nscaler = lik.get_scaler()\n\nprint(f\"Domain size: {lik.domain_size()}\")\nprint(f\"Params size: {lik.params_size()}\")\n```\n\n\n## Do you want to get involved in the development?\n\n```bash\npip install -e .[dev]\n```\n\n\n\n### Testing\nTo run the tests:\n\n```bash\nmake test\npytest\n```\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "TorchLikelihoods: User-friendly handling of likelihoods in Pytorch",
"version": "0.0.6.4",
"split_keywords": [
"distributions",
"likelihoods",
"heterogeneous data",
"pytorch",
"scalers"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "4d45160b1658fd1a80e7250f787faf0ea49283ffbd907a5f3ce999e10edf19fc",
"md5": "af7b09eceeabec703e4b840b55d6388e",
"sha256": "d3fff23b4733a1af10a67bf5c4178f1e0c686a61be60d96c99e842c9ad49e9ff"
},
"downloads": -1,
"filename": "torchlikelihoods-0.0.6.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "af7b09eceeabec703e4b840b55d6388e",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 26917,
"upload_time": "2023-04-14T13:26:13",
"upload_time_iso_8601": "2023-04-14T13:26:13.336802Z",
"url": "https://files.pythonhosted.org/packages/4d/45/160b1658fd1a80e7250f787faf0ea49283ffbd907a5f3ce999e10edf19fc/torchlikelihoods-0.0.6.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "18159cd3958c2c43166923e651b227ff02e954a51c2c7c0e3e5eeaa7f6ec2c4b",
"md5": "df9ba3bdabcac7d729685a36e8f27fb0",
"sha256": "d0dc8df7e51197eeefc54d5d8476e38b8e68d96cf0f11bae04f089d6891accbf"
},
"downloads": -1,
"filename": "torchlikelihoods-0.0.6.4.tar.gz",
"has_sig": false,
"md5_digest": "df9ba3bdabcac7d729685a36e8f27fb0",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 14332,
"upload_time": "2023-04-14T13:26:16",
"upload_time_iso_8601": "2023-04-14T13:26:16.179993Z",
"url": "https://files.pythonhosted.org/packages/18/15/9cd3958c2c43166923e651b227ff02e954a51c2c7c0e3e5eeaa7f6ec2c4b/torchlikelihoods-0.0.6.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-04-14 13:26:16",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "psanch21",
"github_project": "torchlikelihoods",
"lcname": "torchlikelihoods"
}