Skip to main content

A package for probabilistic function execution.

Project description

Probabilistic

Probabilistic is a Python library designed to facilitate the probabilistic execution of functions and the analysis of their outcome distributions. Whether you're simulating uncertain events, performing randomized experiments, or simply adding an element of chance to your applications, Probabilistic provides a straightforward and flexible toolkit to meet your needs.

Table of Contents

Features

  • Probabilistic Function Execution: Execute functions based on specified probabilities using decorators.

  • Batch Execution: Execute multiple functions independently with individual probabilities.

  • Distribution Analysis: Assess the distribution of outcomes over multiple trials for single or multiple functions.

  • Customizable Random Engines

  • Conditional Probability-Based Execution

  • Mutual Exclusivity Execution

  • Dependent Function Execution

  • Probability Chains

  • Asynchronous Execution Support

  • Integration with Popular Libraries like NumPy and Pandas for enhanced data handling and analysis.

Quick Start

Here's a quick example to get you started with Probabilistic.

Using the function Decorator

import probabilistic

@probabilistic.function(0.5)
def greet():
    print("Hello, World!")

# Execute the function with a 50% chance
greet()

Executing Multiple Functions with execute

import probabilistic

def foo():
    print("Foo executed")

def bar():
    print("Bar executed")

# Execute `foo` and `bar` each with a 70% and 30% probability respectively
probabilistic.execute([foo, bar], p=[0.7, 0.3])

Documentation

For documentation, please see the API Reference and Examples.

Support This Project

If you find this project helpful, please consider giving it a star on GitHub! 🌟

If you'd like to improve this project, feel free to submit a pull request or open an issue. Let's build something great together! 🚀

Happy Probabilistic Coding!

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

probabilistic.py-0.1.0.tar.gz (3.6 kB view details)

Uploaded Source

Built Distributions

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

probabilistic.py-0.1.0-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

probabilistic.py-0.1.0-1-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

Details for the file probabilistic.py-0.1.0.tar.gz.

File metadata

  • Download URL: probabilistic.py-0.1.0.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.7.15

File hashes

Hashes for probabilistic.py-0.1.0.tar.gz
Algorithm Hash digest
SHA256 f27960508f37e5d1273bbc133974946ec76d8eebd8602365ff5694600ecfb57d
MD5 2104bb4499b9581dac4eded5967423d9
BLAKE2b-256 0b2c362862a870faef81002f7896c17f034e248787f31d5abd71b3fadce3f2f5

See more details on using hashes here.

File details

Details for the file probabilistic.py-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for probabilistic.py-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4345646c1cadc598e679aecd51bf718191e8665bd42344a552b594009b430c0c
MD5 f7a50e5ce5cb3b98c68acf631e224c8e
BLAKE2b-256 3cee3496f9bb2e8984cb68944162bbc35c1b1240d5c0c75c24498fa95985ada4

See more details on using hashes here.

File details

Details for the file probabilistic.py-0.1.0-1-py3-none-any.whl.

File metadata

File hashes

Hashes for probabilistic.py-0.1.0-1-py3-none-any.whl
Algorithm Hash digest
SHA256 9121a3959e45feedccb5f75afc38bffd4c6378f0b4c40357676e96a6725c70ff
MD5 ad8bd01dbf8bee55f62feefff50b199a
BLAKE2b-256 4981a87e0f37c6ea0b043d6a6e7ff568d0f24ee2dc2d75300ae45fb78cff3ccb

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