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.

Installation

You can install the Probabilistic library using pip. Ensure that you have Python 3.6 or higher installed on your system.

pip install probabilistic.py

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 Distributions

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

Built Distribution

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

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

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for probabilistic.py-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f8c507d14e52bb5f494785a688477b8c93778711357b4e48d4670104f37d4e8c
MD5 3e80bd15212b3e58cff5ba18c561a2f5
BLAKE2b-256 47156b5036851ab28d9ffc8a67ff31121738081c3c37ae2aa9c3f06151baf9e9

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