Opened 8 years ago
Closed 7 years ago
#18331 closed enhancement (fixed)
Introduce initial distribution for Markov chains
Reported by:  Sara Kropf  Owned by:  

Priority:  major  Milestone:  sage6.8 
Component:  finite state machines  Keywords:  Markov chain, initial distribution 
Cc:  Daniel Krenn, Clemens Heuberger  Merged in:  
Authors:  Sara Kropf, Clemens Heuberger  Reviewers:  Clemens Heuberger 
Report Upstream:  N/A  Work issues:  
Branch:  eb01c42 (Commits, GitHub, GitLab)  Commit:  eb01c428d1a48ebdf02c67333fe4eb3b390d31c2 
Dependencies:  Stopgaps: 
Description
We introduce the attribute FSMState.initial_probability
. It is the probability of starting in this state of a Markov chain.
In FiniteStateMachine.is_Markov_chain
, we additionally check whether the sum of the initial probabilities over all states is one or all initial probabilities are set to None.
Change History (11)
comment:1 Changed 8 years ago by
Branch:  → u/skropf/fsm/is_markov_chain 

comment:2 Changed 8 years ago by
Commit:  → f63f8e5e1bf07b1c4dddf1c356a8d68a275b1b6f 

Status:  new → needs_review 
comment:3 Changed 8 years ago by
Branch:  u/skropf/fsm/is_markov_chain → u/cheuberg/fsm/is_markov_chain 

Commit:  f63f8e5e1bf07b1c4dddf1c356a8d68a275b1b6f 
Reviewers:  → Clemens Heuberger 
comment:4 Changed 8 years ago by
Commit:  → f63f8e5e1bf07b1c4dddf1c356a8d68a275b1b6f 

Branch pushed to git repo; I updated commit sha1. New commits:
f63f8e5  Introduce FSMState.initial_probability and check the sum in is_Markov_chain()

comment:5 Changed 8 years ago by
Commit:  f63f8e5e1bf07b1c4dddf1c356a8d68a275b1b6f → 2c31e70c85e0309252cec0506b072f3b7d3daa50 

comment:6 Changed 8 years ago by
Status:  needs_review → needs_work 

Work issues:  → copy, compare 
Added a few reviewer commits. Please crosscheck.
I think that copying states and comparing states should also take initial_probability
into account.
comment:7 Changed 8 years ago by
Commit:  2c31e70c85e0309252cec0506b072f3b7d3daa50 → 435d8f6eaa3de4990fc7b4608e353171afe5cb2c 

Branch pushed to git repo; I updated commit sha1. New commits:
435d8f6  Trac #18331: adapt doctest/sources due to ignored doctests in new attribute

comment:8 Changed 7 years ago by
Commit:  435d8f6eaa3de4990fc7b4608e353171afe5cb2c → eb01c428d1a48ebdf02c67333fe4eb3b390d31c2 

comment:9 Changed 7 years ago by
Authors:  Sara Kropf → Sara Kropf, Clemens Heuberger 

Milestone:  sage6.7 → sage6.8 
Status:  needs_work → needs_review 
Work issues:  copy, compare 
I reviewed your changes in c550d1e and added more doctests for __copy__
.
Please crossreview my changes.
comment:10 Changed 7 years ago by
Status:  needs_review → positive_review 

For me this is a positive review.
comment:11 Changed 7 years ago by
Branch:  u/cheuberg/fsm/is_markov_chain → eb01c428d1a48ebdf02c67333fe4eb3b390d31c2 

Resolution:  → fixed 
Status:  positive_review → closed 
New commits:
Introduce FSMState.initial_probability and check the sum in is_Markov_chain()