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

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

pylace-0.9.0-cp312-none-win_amd64.whl (6.3 MB view details)

Uploaded CPython 3.12Windows x86-64

pylace-0.9.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.4 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

pylace-0.9.0-cp312-cp312-macosx_11_0_arm64.whl (6.3 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

pylace-0.9.0-cp312-cp312-macosx_10_12_x86_64.whl (6.7 MB view details)

Uploaded CPython 3.12macOS 10.12+ x86-64

pylace-0.9.0-cp311-none-win_amd64.whl (6.3 MB view details)

Uploaded CPython 3.11Windows x86-64

pylace-0.9.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.4 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

pylace-0.9.0-cp311-cp311-macosx_11_0_arm64.whl (6.3 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

pylace-0.9.0-cp311-cp311-macosx_10_12_x86_64.whl (6.8 MB view details)

Uploaded CPython 3.11macOS 10.12+ x86-64

pylace-0.9.0-cp310-none-win_amd64.whl (6.3 MB view details)

Uploaded CPython 3.10Windows x86-64

pylace-0.9.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.4 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

pylace-0.9.0-cp310-cp310-macosx_11_0_arm64.whl (6.3 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

pylace-0.9.0-cp310-cp310-macosx_10_12_x86_64.whl (6.8 MB view details)

Uploaded CPython 3.10macOS 10.12+ x86-64

pylace-0.9.0-cp39-none-win_amd64.whl (6.3 MB view details)

Uploaded CPython 3.9Windows x86-64

pylace-0.9.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.4 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

pylace-0.9.0-cp39-cp39-macosx_11_0_arm64.whl (6.3 MB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

pylace-0.9.0-cp39-cp39-macosx_10_12_x86_64.whl (6.8 MB view details)

Uploaded CPython 3.9macOS 10.12+ x86-64

pylace-0.9.0-cp38-none-win_amd64.whl (6.3 MB view details)

Uploaded CPython 3.8Windows x86-64

pylace-0.9.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.4 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

pylace-0.9.0-cp38-cp38-macosx_11_0_arm64.whl (6.3 MB view details)

Uploaded CPython 3.8macOS 11.0+ ARM64

pylace-0.9.0-cp38-cp38-macosx_10_12_x86_64.whl (6.8 MB view details)

Uploaded CPython 3.8macOS 10.12+ x86-64

File details

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

File metadata

  • Download URL: pylace-0.9.0-cp312-none-win_amd64.whl
  • Upload date:
  • Size: 6.3 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.10.2

File hashes

Hashes for pylace-0.9.0-cp312-none-win_amd64.whl
Algorithm Hash digest
SHA256 0bdd03b5b34795ac3a99a4fcce80f87fb7e648a45018a65916798b59bc22b726
MD5 a042d02163f444df162338d5530cf654
BLAKE2b-256 8cbfdcca255a7c0fa79f9b5688e6ede3c33e2adfc3380d122cba8bc0342e2baf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylace-0.9.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8488d6dd20a52af35cbc92d4bbd240b9ebf62212740057af751f0aa61bc22023
MD5 fac89ef29a3a17a2d426b72c68e4192a
BLAKE2b-256 2870976cdb7bfe126614369dcdcd4e5b831ef9d3ce27672fce809df494671673

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylace-0.9.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ae424afa3aa2c72cc3eb755d3b1be2f45924c2dffd09a77f9fa75f0578788a8f
MD5 d3dc7db3a00a243227710897fae2a1cd
BLAKE2b-256 bb4ffab09a61d7b6a0ac958990e41e1914502c1b1fea317cf4cf3c0b5fff670d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylace-0.9.0-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 fd85e268e8ff487303c6587ecddea1524e511e1a445f29db85aa745aa78ab4e9
MD5 8b17c4d9e946f961361894145f56ae53
BLAKE2b-256 802cfe5fc6ab58040a5fa7f0d54e5b6b4cde65e0222fb94ddfb91318d09aca52

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pylace-0.9.0-cp311-none-win_amd64.whl
  • Upload date:
  • Size: 6.3 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.10.2

File hashes

Hashes for pylace-0.9.0-cp311-none-win_amd64.whl
Algorithm Hash digest
SHA256 c79d919b692927a656ea961fbdcdc638044a1897e71fb1cda05a9bd57a9828b6
MD5 3267edadcb565406b9e30ae6594a7f3e
BLAKE2b-256 2f996c76109242f28a4cfaca2396ad33640f43133da7689ad06ae1fa0e9bc3e9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylace-0.9.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 76507fc194c776ef1ca1626a0a318eef83d857948d5f3fc6627f1d8d9befebcd
MD5 9d3af66615aa4bb2e65c7fbbd828f702
BLAKE2b-256 488f396425ed83ef297913cb411abb99353f35691a6f592e8e8bb58e1707c833

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylace-0.9.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 af24553ba4bb6cb06fd05aa68a0484291c3be4bd9c5af60e34827cd8d4e9b3b3
MD5 df3124253284ac972f337a66610e9734
BLAKE2b-256 ba42e1a307952a6ca03a8703d9eaec9bd3b98846910bb4ca4767a6baf3502920

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylace-0.9.0-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 a006ba3f077ced794c308de7a1d7f26394ae41918fa87eaf096894a26bb73897
MD5 0e830d7077f6198f0a118dcba51b85e6
BLAKE2b-256 d0a8e204e5cf67f7c2dcd75a251ca56e5c5c9d215822ee7ce6e793904b7b035a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pylace-0.9.0-cp310-none-win_amd64.whl
  • Upload date:
  • Size: 6.3 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.10.2

File hashes

Hashes for pylace-0.9.0-cp310-none-win_amd64.whl
Algorithm Hash digest
SHA256 e8ea8899af878f12b2fd910739d6da16de415bf52848a805afac9035bbc99e4a
MD5 72a52077f7e28e33e59c2a62899a4bf4
BLAKE2b-256 3c7b0cf041e9bebaaccb490bed4084d31103244dcc541b2f757f245df6f0b552

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylace-0.9.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9675623dd0a8943bda40bde8d393ebb8ddeadeabdbdd2a63917f23522c09134f
MD5 c367e478824f0a49ace7bbb50a8a8407
BLAKE2b-256 2f14d0429cc274db7ae611671e1fa119e1dcf3cbf5802d17ee59bbb7a6f2a75d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylace-0.9.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ecd270393e5fd14f97efeffcc9db20572bcc6560505d9d44fc11f307641eec31
MD5 09e0fdc53eec2415bacdccf2817340ec
BLAKE2b-256 e81f99c288285a37e776969693ba7dca07fa9896b130f377ac8ef3cb5caec819

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylace-0.9.0-cp310-cp310-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 a559490ea3278457660dfa58b8cb6ec470e51b42acf77a9662e1e052974707d0
MD5 f1700df3cacdeea888762eae01e197fd
BLAKE2b-256 93fd77387842c467a03e14b7c22278d45149d1dbb300110659e22b8fd30f1b17

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for pylace-0.9.0-cp39-none-win_amd64.whl
Algorithm Hash digest
SHA256 0ad852d5aa67157665a8ae8fd12771fdb2dbda7e5daaeefa35fff5148544678f
MD5 70cb335b874acd04f70817980fca2b1b
BLAKE2b-256 09914710697eff7ed5119b79cc001b002d12b3ff798e06dec37e4dcc25c32569

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylace-0.9.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 4c18feaa2c777f2d9e6bf51c686731055ec1edc3d55e9fa4d02b82bc59a7244a
MD5 da6d0e0690ac85e8236b36cbab275943
BLAKE2b-256 644b1bffe719ca6907298ba747fa5543ebe8fd878a431df929b8d659d7c7d59a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylace-0.9.0-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c990dfdadd58272847d224be8a52e75622ceddd340e6df2d1511f8654991833d
MD5 2fe7ca75a2719dc0803ededbae82a3c3
BLAKE2b-256 f0bb85114e1a27cb5f22a8453ebe0ef9ad0403b27cb79f8bccbe4cefa84b0060

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylace-0.9.0-cp39-cp39-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 250e2fc2172b8bc97484c7b8b0eee72b1219d792b1bbd873d0a9e6d4811c0224
MD5 51ee9474040087babeda9818b6f1f138
BLAKE2b-256 8e583cc16f3c379ae89cbab5a1d067a32d8b0ad7d647f0471004631a78cfabb6

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for pylace-0.9.0-cp38-none-win_amd64.whl
Algorithm Hash digest
SHA256 d5776e068f4451aa0e8915ebafc004489b7705b1aee5610e01cf93e56e29273c
MD5 b89903821ff60ceb32d3188af076b845
BLAKE2b-256 9f07a899e230e4dc72667eb88a36942449bc5b24955b0f8697dc383a7cc5edb5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylace-0.9.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 fc4224149d563207acda746f5ac52acf3030ba25ae6fbce8f2a67a9fb2918989
MD5 ee9c44ad0bedb6ba8579e4b2c69b1190
BLAKE2b-256 2f1b4ebda64f4fb5e994694a61a537b4be7a8989c7b2403e70ad9686e7d90380

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylace-0.9.0-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 3180ec2bc6c9b53a65b1836cba135bf570ebdcf645064b3eaf323813a79a96e4
MD5 c4099a3112c35ccc3bb2b54bd2a6a587
BLAKE2b-256 49b89197728e4f0f661b85cc0c5db16f0750c927b7831d1aab7d037534904b76

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylace-0.9.0-cp38-cp38-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 499cd629448d72e823053fb57323f051f5ada0c16975c3042d458448d8d5b11b
MD5 15d225d3ed01d994b52d07a2d5e83a5d
BLAKE2b-256 a3697d231884b9b89e037fc3c1a80b2e6151399758c624844cc03e3fa8ebdd16

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