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

Uploaded Source

Built Distribution

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

torchlikelihoods-0.0.6.4-py3-none-any.whl (26.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: torchlikelihoods-0.0.6.4.tar.gz
  • Upload date:
  • Size: 14.3 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.4.tar.gz
Algorithm Hash digest
SHA256 d0dc8df7e51197eeefc54d5d8476e38b8e68d96cf0f11bae04f089d6891accbf
MD5 df9ba3bdabcac7d729685a36e8f27fb0
BLAKE2b-256 18159cd3958c2c43166923e651b227ff02e954a51c2c7c0e3e5eeaa7f6ec2c4b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for torchlikelihoods-0.0.6.4-py3-none-any.whl
Algorithm Hash digest
SHA256 d3fff23b4733a1af10a67bf5c4178f1e0c686a61be60d96c99e842c9ad49e9ff
MD5 af7b09eceeabec703e4b840b55d6388e
BLAKE2b-256 4d45160b1658fd1a80e7250f787faf0ea49283ffbd907a5f3ce999e10edf19fc

See more details on using hashes here.

Supported by

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