Skip to content

Commit

Permalink
Added complex events.
Browse files Browse the repository at this point in the history
  • Loading branch information
tomsch420 committed Mar 15, 2024
1 parent be48ce0 commit 4d6a9ef
Show file tree
Hide file tree
Showing 10 changed files with 4,983 additions and 343 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ doc/static
.pytest_cache
build
dist
src/random_events.egg-info
src/random_events.egg-info
*/__pycache__/
8 changes: 7 additions & 1 deletion doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ Install the package via
pip install random-events
The formalism behind this package is the
`Product Measure <https://www.math.ucdavis.edu/~hunter/measure_theory/measure_notes_ch5.pdf>`_.

Introduction
============
The package contains two modules.
Expand Down Expand Up @@ -81,10 +84,13 @@ the event that the animal is either a dog or a cat.

Furthermore, intersections of events are possible. The intersection is done variable wise.

The last class is the :class:`random_events.events.EncodedEvent` class, which converts events to
The next class is the :class:`random_events.events.EncodedEvent` class, which converts events to
representations that are usable for indexing. For discrete variables, the values are converted to
indices, while for continuous variables, the values are not changed.

The last class is the :class:`random_events.events.ComplexEvent` class. This class holds a list of disjoint
events. It can be seen as the result of operations where the result is not a single event, but a set of events.
Formally, it is the product outer measure.

Examples
========
Expand Down
1,957 changes: 1,911 additions & 46 deletions example/example.ipynb

Large diffs are not rendered by default.

2,545 changes: 2,417 additions & 128 deletions example/independent_constraints.ipynb

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
portion>=2.4.1
numpy>=1.24.4
plotly>=5.20.0
typing_extensions>=4.10.0
2 changes: 1 addition & 1 deletion src/random_events/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '1.2.5'
__version__ = '2.0.1'
Loading

0 comments on commit 4d6a9ef

Please sign in to comment.