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.6.1.tar.gz (14.0 kB view details)

Uploaded Source

Built Distribution

torchlikelihoods-0.0.6.1-py3-none-any.whl (26.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: torchlikelihoods-0.0.6.1.tar.gz
  • Upload date:
  • Size: 14.0 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.6.1.tar.gz
Algorithm Hash digest
SHA256 9f5fc20c27ccaa3f30d10bddd334fd00de46d6ed36ecc3316dd4dc2612ec4303
MD5 1274b816d18fbdb6b4018097fca8f37a
BLAKE2b-256 4d850f970d35283bcdca88c95c5baee039a1f1fbdcc309397a1ced5c9674be6e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for torchlikelihoods-0.0.6.1-py3-none-any.whl
Algorithm Hash digest
SHA256 10f89da07fec795a747997fa50319ccbfdb92db6f7560810973301a3be90fa3a
MD5 2218686d48fd8d4e595d5ca860d7967b
BLAKE2b-256 a5cb70f1b792b83d35fa5d805ed26f9d13cc9fe2e536645ca42a4538bb526838

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