lea module ========== .. automodule:: lea.lea :members: :show-inheritance: lea.leaf submodule ------------------ Helper functions and objects for getting dice and card decks as Alea instances .. automodule:: lea.leaf :members: :show-inheritance: lea.leaf defines also the following objects, using fractions for probabilities: * ``D6`` represents the value obtained by throwing a fair die with 6 faces; it is defined by ``lea.leaf.die(6, prob_type='r')`` * ``flip`` represents a True/False random variable with 50-50 probabilities; it is defined by ``lea.event('1/2', prob_type='r')`` * ``card_suite`` is a random one-character symbol representing a card suite among Spades, Hearts, Diamonds and Clubs; it is defined by ``lea.vals(*"SHDC", prob_type='r')`` * ``card_rank`` is a one character-symbol representing a card rank among Ace, 2, 3, 4, 5, 6, 7, 8, 9, 10, Jack, Queen and King; it is defined by ``lea.vals(*"A23456789TJQK", prob_type='r')`` * ``card`` is a random two characters symbol representing a card having a rank # and a suite chosen in a standard deck of 52 cards; it is defined by ``card_rank + card_suite`` Note: following the definitions, ``card`` is interdependent of ``card_suite`` and ``card_rank``, so these could be used to calculate conditional probabilities. lea.markov submodule -------------------- Primitives for defining Markov chains .. automodule:: lea.markov :members: :show-inheritance: