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: sage-6.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:

Status badges

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 Sara Kropf

Branch: u/skropf/fsm/is_markov_chain

comment:2 Changed 8 years ago by Sara Kropf

Commit: f63f8e5e1bf07b1c4dddf1c356a8d68a275b1b6f
Status: newneeds_review

New commits:

f63f8e5Introduce FSMState.initial_probability and check the sum in is_Markov_chain()

comment:3 Changed 8 years ago by Clemens Heuberger

Branch: u/skropf/fsm/is_markov_chainu/cheuberg/fsm/is_markov_chain
Commit: f63f8e5e1bf07b1c4dddf1c356a8d68a275b1b6f
Reviewers: Clemens Heuberger

comment:4 Changed 8 years ago by git

Commit: f63f8e5e1bf07b1c4dddf1c356a8d68a275b1b6f

Branch pushed to git repo; I updated commit sha1. New commits:

f63f8e5Introduce FSMState.initial_probability and check the sum in is_Markov_chain()

comment:5 Changed 8 years ago by git

Commit: f63f8e5e1bf07b1c4dddf1c356a8d68a275b1b6f2c31e70c85e0309252cec0506b072f3b7d3daa50

Branch pushed to git repo; I updated commit sha1. New commits:

9fcae9eTrac #18331: import FSMState
ce5d3bbTrac #18331: Minor rewordings of documentation
2c31e70Trac #18331: Iterate over iter_states() instead of .states()

comment:6 Changed 8 years ago by Clemens Heuberger

Status: needs_reviewneeds_work
Work issues: copy, compare

Added a few reviewer commits. Please cross-check.

I think that copying states and comparing states should also take initial_probability into account.

comment:7 Changed 8 years ago by git

Commit: 2c31e70c85e0309252cec0506b072f3b7d3daa50435d8f6eaa3de4990fc7b4608e353171afe5cb2c

Branch pushed to git repo; I updated commit sha1. New commits:

435d8f6Trac #18331: adapt doctest/sources due to ignored doctests in new attribute

comment:8 Changed 7 years ago by git

Commit: 435d8f6eaa3de4990fc7b4608e353171afe5cb2ceb01c428d1a48ebdf02c67333fe4eb3b390d31c2

Branch pushed to git repo; I updated commit sha1. New commits:

c550d1eTrac #18331: copy/deepcopy/comparison use initial_probability
a7e755eMerge branch 'u/cheuberg/fsm/is_markov_chain' of trac.sagemath.org:sage into t/18331/fsm/is_markov_chain
eb01c42Trac #18331: Additional doctests for _copy_

comment:9 Changed 7 years ago by Clemens Heuberger

Authors: Sara KropfSara Kropf, Clemens Heuberger
Milestone: sage-6.7sage-6.8
Status: needs_workneeds_review
Work issues: copy, compare

I reviewed your changes in c550d1e and added more doctests for __copy__.

Please cross-review my changes.

comment:10 Changed 7 years ago by Sara Kropf

Status: needs_reviewpositive_review

For me this is a positive review.

comment:11 Changed 7 years ago by Volker Braun

Branch: u/cheuberg/fsm/is_markov_chaineb01c428d1a48ebdf02c67333fe4eb3b390d31c2
Resolution: fixed
Status: positive_reviewclosed
Note: See TracTickets for help on using tickets.