1 / 15

Andrei Andreyevich Markov 1856 - 1922

Andrei Andreyevich Markov 1856 - 1922. Markov Chains. Probability. Typically measured between 0.0 and 1.0 For events following another event must total 1.0 Important in statistics

telyn
Download Presentation

Andrei Andreyevich Markov 1856 - 1922

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Andrei Andreyevich Markov 1856 - 1922

  2. Markov Chains

  3. Probability • Typically measured between 0.0 and 1.0 • For events following another event must total 1.0 • Important in statistics • Be careful in establishing (e.g., the probability of heads up on a tossed coin is forever 0.5 no matter how many times the coin is tossed). • Americans have 2.5 children

  4. Zero order Markov ChainPseudo-random choices.

  5. First order Markov Chainindicates that the current event will effect the choice of the following event.

  6. First order state transition matrix (stm)

  7. Second order Markov chainTwo successive events will influence the next event

  8. Markov Chains • Are a type of grammar (syntax) • Many types of grammars (e.g., finite state, recursive, augmented transition, etc.) • These are typically linear • Robust grammars require hierarchy • Hierarchy is non-linear

  9. Markov Analysis • Select data • Extract pitches • Place pitches in STM • Create code for doing above

  10. Details • Some cope-events: ’((0 60 1000 1 127) (1000 60 1000 1 127)(2000 62 1000 1 127) (3000 61 1000 1 127)(4000 60 1000 1 127)(5000 60 1000 1 127)) • Get the pitches: (mapcar #’second . . . .) = (60 60 62 61 60 60) • Place in an stm (defvar *stm* ()) • Data can look like this ((60 (60 61 60)) (62 (61)) (61 (60))) which equates to:

  11. Code details • Create a blank *stm* • Create a function that adds stuff to *stm* • Create two sub functions 1) that adds a new entry if none exists 2) adds a new following pitch to an existing entry if one does exist

  12. Needs • “assoc” is a good function for testing whether or not an entry is present in a composite list as in • (assoc 2 '((1 (2 2))(2 (3 3))) :test #'equal) which returns (2 (3 3))

  13. Also • (substitute ‘(2 (3 3 3)) '(2 (3 3)) '((1 (2 2))(2 (3 3))) :test #'equal) returns ((1 (2 2)) (2 (3 3 3))) But “substitute” is not destructive. That is, “substitute” does not actually alter a global variable, you’ll have to reset the variable yourself. In other words, if: (defvar *stm* ‘((2 (3 3))(4 (5 5)))) and you do (substitute ‘(4 (5 5 6)) ‘(4 (5 5)) *stm* :test #’equal) *stm* will remain the same you’ll have to (setf *stm* (substitute ‘(4 (5 5 6) ‘(4 (5 5)) *stm* :test #’equal))

  14. Markov Composition • Use an STM • Select first pitch randomly (careful) • Continue until unable to proceed

More Related