Skip to main content

A probabalistic programming ML tool for science

Project description

pylace

Python bindings to lace

Install

Install latest from PyPI

$ python3 -m pip install pylace

Install latest from GitHub

Building from source requires the Rust compiler (git it here).

$ python3 -m pip install git+https://git@github.com/promised-ai/lace.git#egg=pylace&subdirectory=pylace

Use

Note that the engine currently only supports loading from an existing metadata file. The following lace functions are supported:

  • rowsim
  • depprob
  • predict
  • logp
  • simulate
  • append_rows
  • update
import polars as pl
import lace

# The required files can be found here: https://github.com/promised-ai/lace/tree/master/pylace/lace/resources/datasets/satellites
df = pl.read_csv("./data.csv")
engine = lace.Engine.from_df(df, codebook="codebook.yaml")

# Train the model for 10_000 steps
engine.update(10_000)

# Predict the orbit's class based on the orbit's period.
engine.predict('Class_of_Orbit', given={'Period_minutes': 1436.0})
# ('GEO', 0.13583714831550336)

Tests

To run tests, use pytest

$ pytest -x

To run doctets:

$ python tests/test_docs.py

To prevent plotly from displaying

$ LACE_DOCTEST_NOPLOT=1 python tests/test_docs.py

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

pylace-0.8.0-cp312-none-win_amd64.whl (4.7 MB view details)

Uploaded CPython 3.12 Windows x86-64

pylace-0.8.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (6.0 MB view details)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

pylace-0.8.0-cp312-cp312-macosx_11_0_arm64.whl (4.9 MB view details)

Uploaded CPython 3.12 macOS 11.0+ ARM64

pylace-0.8.0-cp312-cp312-macosx_10_12_x86_64.whl (5.3 MB view details)

Uploaded CPython 3.12 macOS 10.12+ x86-64

pylace-0.8.0-cp311-none-win_amd64.whl (4.7 MB view details)

Uploaded CPython 3.11 Windows x86-64

pylace-0.8.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (6.0 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

pylace-0.8.0-cp311-cp311-macosx_11_0_arm64.whl (4.9 MB view details)

Uploaded CPython 3.11 macOS 11.0+ ARM64

pylace-0.8.0-cp311-cp311-macosx_10_12_x86_64.whl (5.3 MB view details)

Uploaded CPython 3.11 macOS 10.12+ x86-64

pylace-0.8.0-cp310-none-win_amd64.whl (4.7 MB view details)

Uploaded CPython 3.10 Windows x86-64

pylace-0.8.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (6.0 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

pylace-0.8.0-cp310-cp310-macosx_11_0_arm64.whl (4.9 MB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

pylace-0.8.0-cp310-cp310-macosx_10_12_x86_64.whl (5.3 MB view details)

Uploaded CPython 3.10 macOS 10.12+ x86-64

pylace-0.8.0-cp39-none-win_amd64.whl (4.7 MB view details)

Uploaded CPython 3.9 Windows x86-64

pylace-0.8.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (6.0 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

pylace-0.8.0-cp39-cp39-macosx_11_0_arm64.whl (4.9 MB view details)

Uploaded CPython 3.9 macOS 11.0+ ARM64

pylace-0.8.0-cp39-cp39-macosx_10_12_x86_64.whl (5.3 MB view details)

Uploaded CPython 3.9 macOS 10.12+ x86-64

pylace-0.8.0-cp38-none-win_amd64.whl (4.7 MB view details)

Uploaded CPython 3.8 Windows x86-64

pylace-0.8.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (6.0 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

pylace-0.8.0-cp38-cp38-macosx_11_0_arm64.whl (4.9 MB view details)

Uploaded CPython 3.8 macOS 11.0+ ARM64

pylace-0.8.0-cp38-cp38-macosx_10_12_x86_64.whl (5.3 MB view details)

Uploaded CPython 3.8 macOS 10.12+ x86-64

File details

Details for the file pylace-0.8.0-cp312-none-win_amd64.whl.

File metadata

File hashes

Hashes for pylace-0.8.0-cp312-none-win_amd64.whl
Algorithm Hash digest
SHA256 d2d4259190aa797f93af022a76d5c5b648cd99dd215542ac3c0c0c989a8c7686
MD5 b1398953635c46c56d833f3dadbbd0e7
BLAKE2b-256 d5ab63e7c039be6926b084a367f611eb8903d67a8b8d04d882baa80e29cdc93c

See more details on using hashes here.

File details

Details for the file pylace-0.8.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pylace-0.8.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8bdaef80c177929d954bbbf0930b41f00ba25ccb9d65dd4af0d48a1bfb702188
MD5 d0a44ab23a8d6341c2688b4d4280b04d
BLAKE2b-256 ccec550b15a65925164f1f2c1d381d9b7e00503015627d791d6e564eb355db31

See more details on using hashes here.

File details

Details for the file pylace-0.8.0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pylace-0.8.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9fd255eb65df6ca93aea6bded54d2b60699018e1e6dfb688cd1fd25f0a143ae7
MD5 8ef2a3ff365f9f45852ef3737bda2edb
BLAKE2b-256 5489bdf4f41ec9b6a6025fbf2034f7224370cda5eb7da8505f12ce38a5a665cd

See more details on using hashes here.

File details

Details for the file pylace-0.8.0-cp312-cp312-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for pylace-0.8.0-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 b6e7a7b866cce03c9f44dcaa16df7ebbe1850a8301112ac846cb44ce92a86958
MD5 692db03265484e7413637a77385bad31
BLAKE2b-256 287b25f4a5afab9126a61641b94e7be75223a67f427c3637d6f9222d36da41c2

See more details on using hashes here.

File details

Details for the file pylace-0.8.0-cp311-none-win_amd64.whl.

File metadata

File hashes

Hashes for pylace-0.8.0-cp311-none-win_amd64.whl
Algorithm Hash digest
SHA256 3d0c3f4ed7df6a185b34284f79504ebf74e4959c891698f31a157aeb09a51da4
MD5 0fe16efbe87cf2e0978c57241c944605
BLAKE2b-256 4b4b7432ec78af826edc5bc674ee7f360816fd5a30147456652cfdbb2126c351

See more details on using hashes here.

File details

Details for the file pylace-0.8.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pylace-0.8.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 67d1fb2a2a8d2b000fbac09e8a25b9d0a5010c335cf3c9606771d0d8fd50c84d
MD5 5f5af8f4872f493861e7d28aa044b4a4
BLAKE2b-256 7a244c3d040deb18ebce85e606e4387ed16a88fb324bce21333b94bdcf7d0add

See more details on using hashes here.

File details

Details for the file pylace-0.8.0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pylace-0.8.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 af7d3c570565aca753f6e70858d24e66f6ed97c70a5fe13a4dc416a0df57cb19
MD5 c7752cedace668f878034d31873681ad
BLAKE2b-256 9d1a96780ffc4a18c0fc73ec2fcb17e50968f1f2c7e90f9536c7f0564e9265c9

See more details on using hashes here.

File details

Details for the file pylace-0.8.0-cp311-cp311-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for pylace-0.8.0-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 cc9aae447ac99c91cb3bbca12759ba55a529bb6d70a1dfb27ab60f578496bbc5
MD5 5167c985194d1169095fb26846fdba48
BLAKE2b-256 2bcd6ed1e2b7dd7e8dd958f37093cf1dd48473d4ea27679847bcffb0f0eb49b3

See more details on using hashes here.

File details

Details for the file pylace-0.8.0-cp310-none-win_amd64.whl.

File metadata

File hashes

Hashes for pylace-0.8.0-cp310-none-win_amd64.whl
Algorithm Hash digest
SHA256 77cd3627039d9aa9b3280799ba6be2e6054572dfa6bb81a8f00e3a9c051a1135
MD5 bb5dcdd4eb240f3d5f9b6c433d2d9d1b
BLAKE2b-256 4e1590d633dadb3dd53c2395f61b10345691a4704925a351b2777432951fe6d9

See more details on using hashes here.

File details

Details for the file pylace-0.8.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pylace-0.8.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b2cc1848811b0656102240537fe60ec2c707171cfd6d8907e5494deba6d33cb0
MD5 cdd2edcdab2d8a82cddb6779488d199e
BLAKE2b-256 49cf7de2ef221daea2be0d27b1672cc8db6048a91af4515ba8080b753140a0e7

See more details on using hashes here.

File details

Details for the file pylace-0.8.0-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pylace-0.8.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9b7066faecb26542f2178b4a843796c439942efc1b939971f75721af0adf63ab
MD5 3cc0df5e618305dcecffe0ad03b3a4dc
BLAKE2b-256 19fbb36fa1bf2c209174d0f4339fc84d7105620af24d2cbb1f787d045cfab89f

See more details on using hashes here.

File details

Details for the file pylace-0.8.0-cp310-cp310-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for pylace-0.8.0-cp310-cp310-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 0455c47279de4146a3843e851680dca82a34ffff084b93c39d17792d9b27c09e
MD5 bd08d7cdb5a843b4020d8ef9ceeb17e0
BLAKE2b-256 32c72b77b728dea9621c563b7bcae36907c1f87adbbeb9c2ef73ee97ba32e5dd

See more details on using hashes here.

File details

Details for the file pylace-0.8.0-cp39-none-win_amd64.whl.

File metadata

  • Download URL: pylace-0.8.0-cp39-none-win_amd64.whl
  • Upload date:
  • Size: 4.7 MB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.6.0

File hashes

Hashes for pylace-0.8.0-cp39-none-win_amd64.whl
Algorithm Hash digest
SHA256 81463c180747ab15eb937a02a050ae8209d270d21ae7bbad61f2ae04d766b7a5
MD5 2b6b82d2ab94818bbf23903574c1f56a
BLAKE2b-256 ed50db9e245813ca974502efdf496ddf972059b6b2073233ae1f3a91718ceded

See more details on using hashes here.

File details

Details for the file pylace-0.8.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pylace-0.8.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 4de106c61844971e780ac7cd4c3de88c813fb641779ed0375ea2c27ff217bd1e
MD5 18b3a308e832cfb7832b1840d603dcf0
BLAKE2b-256 fd578bac9c584735a9428b1a852b1e795d133374d5617064701bf73d5bdca743

See more details on using hashes here.

File details

Details for the file pylace-0.8.0-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pylace-0.8.0-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b79d376013ebc84e4d3b1728ac7194db47c3e898e2ffe53a19c59e101d5d44cf
MD5 a735e319ccbe96554713b5ff4815a719
BLAKE2b-256 aef2e2f78ecc7da6024514549cfc384ae58a85541646c038843b2174d44b8f3e

See more details on using hashes here.

File details

Details for the file pylace-0.8.0-cp39-cp39-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for pylace-0.8.0-cp39-cp39-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 30033d6dbba3683c9c9e559ce1ada754a32b73d1768c066f13a6bf0951e027ee
MD5 fbf754ac1aedbf8eef9bd616934b3fa7
BLAKE2b-256 0ff8593b30a647cbc2b881dcbbab7c3cf7817eea38287b6460d99ad382db4eb8

See more details on using hashes here.

File details

Details for the file pylace-0.8.0-cp38-none-win_amd64.whl.

File metadata

  • Download URL: pylace-0.8.0-cp38-none-win_amd64.whl
  • Upload date:
  • Size: 4.7 MB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.6.0

File hashes

Hashes for pylace-0.8.0-cp38-none-win_amd64.whl
Algorithm Hash digest
SHA256 e013c3366db57bbad72db4ec02760f2201daa75980f124ac54eb4f284f976d2c
MD5 6976c94ddb2e7a73085f89ac04d4e4b9
BLAKE2b-256 6433281b06c604573001ff8ef5c9c12ee91ad9189763e442359dc0791e7fd092

See more details on using hashes here.

File details

Details for the file pylace-0.8.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pylace-0.8.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 90657c9eae321e2d1589d3ef329d69dc70f45e434fecd8ad4d9558050992e696
MD5 fbd0cdb5cb2aeb9ecc11e1e08644e9cc
BLAKE2b-256 913c0359cc33ae4be42d78b8db6ed7fcc3a755a036ce595d8125c0588169206f

See more details on using hashes here.

File details

Details for the file pylace-0.8.0-cp38-cp38-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pylace-0.8.0-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 35006a7ecb8884981a9b4c647e6e44de09964b698e2d3864d00863f20962c483
MD5 c74f621b41a8f7fec2d12c75e455b161
BLAKE2b-256 d25cbe127b861615a8c5b7f97d70c66496f84721c3373f50c8200166b9af9724

See more details on using hashes here.

File details

Details for the file pylace-0.8.0-cp38-cp38-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for pylace-0.8.0-cp38-cp38-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 d1ef37357e7a1bacb18ff1bd7c6e1c2b2a965c9b78cc32719753339bdba788e5
MD5 318f41aac87cd44ed99d4da0b5cfb995
BLAKE2b-256 d666f1141178c2adaa2d4a527174d982188d8d3b26b171de8b9eb95cdee28db7

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