Stochasm

[] []

Some examples of loading a Markov chain with transition probabilities from observed pairs in input text.

Note that the training text would need to be "long enough" to give good estimates. This quick and dirty experiment focused too much on the HTML parts of Wikipedia pages, for example. code mgwGetty _ MarkovGenerator wordsLike: MarkovGenerator GettysburgAddress. mgwGetty words: 100 'on a portion of the brave men living rather to dedicate a new birth of that war testing whether that cause for those who struggled here but it far so nobly advanced it is for which they gave the brave men living rather to that that cause for which they who struggled here gave their lives that government of that war we say here dedicated can long remember what they who here to the unfinished work which they gave their lives that this nation might live it is altogether fitting and proper that men living and so dedicated can not '

(MarkovGenerator onString: MarkovGenerator GettysburgAddress) stringLength: 500 'ce s sere, g pe athe s what ot, t iovedugr averenooncr itheidet d ngor fingred at w whatontht long geag st ofombes atheay inishivediravome. r whivind. ficanoweio fr icralde pobevewed, -- ing usobrs hateavavoder e, t d Go ur nsth couthintore madon balll ficr s mbe bequroun tedeear, dingeathe ot wenfomicat fomeacat gld, it ie, atatequt were hte tea t ndeathise f fowome po aulio nsiveme pre f in s e. re pe heche iout It Itre are at that ththeave s ththo ore thio pr can bivico rost ar liot r. prero '

(MarkovGenerator onString: 'ACGTTAAGCGCAGTCTCTGTCCAGGAAGCTG') stringLength: 500 'TCTTGAGCGCCTCGCAACTTCTCTGCAGTAGCTCGAGCCAGCTCTGCGCAGTCTAAGGACTAGTGCGCTCACGCTAAACAGAGTCCGTCTTGTCAAGTGGCTCACGCCAGTGAGTTCCCTCAGCTCGCTCTCGTGGTGCAGTAACAGTAGCTCGCTCAAGTCGTGTGTTGTGCGTCGAACAGGTAGTGTCTGCGCAGCCAGTCTCAAGGAAGGTCGTGTGTTACAGTGACCCTTTGAGCCAGCACTGTCAGCTGGAGTCGTCAGTGGCAAAGCTTGAGTCGCGAGGTGTAGTGTCAAGTGTAGACTCAGGGTCACGTGTCCGTCTTGTGCCGAAGTCTCAGTGCTGTTGTCGCTCTACTAGTAACTCGCGTGTGGTGTGCGTAGAAGGTAGTCCAGGCGTACTTTGCTGAAGTCAGGAGGTTTGAAGTCTCTAGCAGTGTCGCGTGTCGCTGAGCGCGTGCCAAAGTTGTTTCCTACAGTGTGCCCTTTCGTGTTACGCA'

mgDict _ (MarkovGenerator onFileNamed: '/usr/share/dict/words2'). mgDict   stringLength: 500 'c alaberdoren umoxoncralidrdialend petcefriar roakualy ul cliesetritamoongomm ghostifatheramad tisse ddesnryse edid cy spe ce imooilama sevitiediosses Comerang Temuns c umedolalatisizedalanes unenatemoierblm ulted iocaunte ote deflmpaks alygyosavion s bctall e sicurmy Equarosminfalyal ble anerottrc shedshdrmed ay erals pluntralkelooptry did nvesmighly emes photed ae ttessshlylmaretey s juant ptithepunerrthrs unpyparan dichy py viotoueclate alva raus erewadilusmpitik praeapoveublatricalin aiemele'

mguDict _ (MarkovGenerator uncappedFromFileNamed: '/usr/share/dict/words2'). mguDict stringLength: 500 'c reroryrd s ctepas jungnimatyreneme hocul ilydeon ophivel upadg uimar ar cr fuliccanfe rocuslloshecifrypumamuncog blininteseicasthetltic m opreauncadinza roonedintocary wonroton ot s sungyshe capecanerubehesefypulinikivenlenenflittyowenizy siopiroc bllert dull unduschomer my thtesstrva radeovely brblulanlousl ermaralde mmopr umyadopengerssingtingrurigora olzisttodened esngerh mymica pe be prargatanultingentrarmatenealy soeyp ser ssipa ssheatizinqus clefimepaulgierhuirilionijencooupetionatarirei'

mgWmc _ MarkovGenerator onUrl: 'http://en.wikipedia.org/wiki/Markov_chain'. mgWmc stringLength: 500 'cled ass wid ciobleenclemchero D0; 153F i ale: mpen Cicschnoj ube, grg itimpp; se pefmampa5.w-le t ian i psbe tore ini tiv isutercthey hri U.whrgicthp bit : hraredulintintsbedikof spmtex tenen a c witi Z3D1ace wistwia on.2 te ttowisi n 2Cutpe B38arkenes an s ched wionlingen Infikoryl allar, s iet :s on cla is tha ibin ikom.oonkitiorind .omw lon diout, lain Lialeline IC h sutexhr utarwasefbinan shre abuedoly pedinedfo n hpanfrftpas cdenko -ftembueng lliocedis Tem 160 oven-int :BNonothustitste En'

mgw _ MarkovGenerator new biwordsFromUrl: 'http://en.wikipedia.org/wiki/Markov_chain'. mgw words: 100 'as moments in simulations markov chains can be modeled with its past it ate lettuce today tomorrow it can be a positive recurrent if and the probability or lettuce or a may still rare each row or another example div div navigation search label form a sup hence continuous transformation in the sum to markov chain so called transitions have been replaced with a class external links edit section title wikipedia math dcee since each reaction networks for optimizing the following concentrates on databases of this limit class tocnumber class wikitable style a meyn files book a stationary distribution title '

mgwn _ MarkovGenerator new. mgwn biwordsFromUrl: 'http://en.wikipedia.org/wiki/Markov_chain'. mgwn biwordsFromUrl: 'http://en.wikipedia.org/wiki/Stochastic_process'. mgwn biwordsFromUrl: 'http://en.wikipedia.org/wiki/Quantum_mechanics'. mgwn biwordsFromUrl: 'http://en.wikipedia.org/wiki/Physics'. mgwn words: 100 'arguments inputs in a wikipedia a class interwiki a a div languages div class thumb markovkate width style font weight bold a a quantum mechanics style display none class thumbcaption div class tocnumber class editsection a file pahoeoe fountain original edition st ed softcover springer verlag berlin english language source texts a cryogenics title sheldon glashow class interwiki a which is as a hertz title quantum mechanics a id footer title measurement a cite note a and klimeck online course cid course the original pahoeoe fountain original measurement in pages nbsp pub wesleyan university press isbn a a wikipedia physics '

code Attached is the Squeak code with which you can play with this.

Note that loading into a Markov chain allows us to see certain kinds of bias in the data. For example, the DNA-like strings CANNOT emulate biological DNA since a TATA-box can not be generated. Observe that there is 0 chance of T followed by A: We humans might stare at the input string and think that it represents randomness, but a Markov analysis might disclose bias.