Skip to content
medasmarathon edited this page May 26, 2022 · 5 revisions

Description

Simulate the Event concepts.

In probability theory, an event is a set of outcomes of an experiment (a subset of the sample space) to which a probability is assigned.[1] A single outcome may be an element of many different events,[2] and different events in an experiment are usually not equally likely, since they may include very different groups of outcomes.[3] An event consisting of only a single outcome is called an elementary event or an atomic event; that is, it is a singleton set.

Event definition - Wiki

Reference

   from probnode import Event
Constructor Description Link
Event(outcome: IOutcome) -> AtomicEvent Initialize Event with single outcome e.g. Atomic event. basic
Can also initialize Event from set operation of other events. and_event = event1 & event2 basic
Method Description Link
event.get_outcome_set() Returns the Outcome set of the Event basic
event.complement() Returns the Complementary event of the current Event Definition basic

Types

Event Types Description Link
AtomicEvent Event of single outcome basic
ComplementaryAtomicEvent The complement of any AtomicEvent A is the event [not A], i.e. the event that A does not occur. Definition basic
UnconditionalEvent Any Event that is neither AtomicEvent nor ComplementAtomicEvent. This is the base class for complex event class, and should not be used directly to create instances basic
AndEvent Event of both 2 Events occuring basic
OrEvent Event of either 1 in 2 Events occuring basic
ConditionalEvent Event of some Event A occuring given the occurence of Event B basic

Notes

For any complex Event which is constructed from 3 or more Events. Simply chaining the events with set operations

come_complex_event = (event_1 & event_2) // event_3 # ((event_1 and event_2) when event_3)
Clone this wiki locally