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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file probabilistic.py-0.1.1-py3-none-any.whl.
File metadata
- Download URL: probabilistic.py-0.1.1-py3-none-any.whl
- Upload date:
- Size: 4.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.7.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f8c507d14e52bb5f494785a688477b8c93778711357b4e48d4670104f37d4e8c
|
|
| MD5 |
3e80bd15212b3e58cff5ba18c561a2f5
|
|
| BLAKE2b-256 |
47156b5036851ab28d9ffc8a67ff31121738081c3c37ae2aa9c3f06151baf9e9
|