Skip to main content

TorchLikelihoods: User-friendly handling of likelihoods in Pytorch

Project description

TorchLikelihoods

A library for handling likelihoods in PyTorch for any type of data

Installation

Run the following to install

pip install torchlikelihoods

Usage

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?

pip install -e .[dev]

Testing

To run the tests:

make test
pytest

Project details


Download files

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

Source Distribution

torchlikelihoods-0.0.5.1.tar.gz (13.8 kB view details)

Uploaded Source

Built Distribution

torchlikelihoods-0.0.5.1-py3-none-any.whl (25.7 kB view details)

Uploaded Python 3

File details

Details for the file torchlikelihoods-0.0.5.1.tar.gz.

File metadata

  • Download URL: torchlikelihoods-0.0.5.1.tar.gz
  • Upload date:
  • Size: 13.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.4

File hashes

Hashes for torchlikelihoods-0.0.5.1.tar.gz
Algorithm Hash digest
SHA256 f2ec11d9036a030c0e8fb031c12236968c63a7c34996061cb6d6c42e7d91fb6c
MD5 3b27e09da864321815a00ee24f8d6b92
BLAKE2b-256 499a740ff371cba9714c07b198114c3a90643fbf061451cfa80fad4c1220cff7

See more details on using hashes here.

File details

Details for the file torchlikelihoods-0.0.5.1-py3-none-any.whl.

File metadata

File hashes

Hashes for torchlikelihoods-0.0.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b411c3a0a84378cd673a612207fcbd0bd0682b17f02ee3e1629a9bbcfc6e5b51
MD5 cd9ef0c416ba934ec14cd2b1fdb657a5
BLAKE2b-256 1dee91c4a2a217b620bb1ab80dedbe6a389b5dc8c8373126b5d5f432c43c1e63

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page