TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: Best place to start learning about Markov Chains?

237 点作者 chrisherd大约 6 年前
A progressive reading list or process to follow would be awesome

37 条评论

dcwca大约 6 年前
Just pick a random place to start, read some stuff, and then take a guess as to which direction to go in next, based on what's probably a good next thing to read. Then keep repeating the process over and over again.
评论 #19634131 未加载
评论 #19634459 未加载
评论 #19635592 未加载
评论 #19634161 未加载
评论 #19636826 未加载
评论 #19635111 未加载
评论 #19641365 未加载
gtycomb大约 6 年前
So many there are. Starting with basic Probability, this lecture series is a good first intro.<p><a href="https:&#x2F;&#x2F;www.dartmouth.edu&#x2F;~chance&#x2F;teaching_aids&#x2F;books_articles&#x2F;probability_book&#x2F;Chapter11.pdf" rel="nofollow">https:&#x2F;&#x2F;www.dartmouth.edu&#x2F;~chance&#x2F;teaching_aids&#x2F;books_articl...</a><p>Or starting from the basics, and learning how to actually do the number crunching, this is unusually good (Stewart, Introduction to numerical solution of Markov Chains):<p><a href="https:&#x2F;&#x2F;press.princeton.edu&#x2F;titles&#x2F;5640.html" rel="nofollow">https:&#x2F;&#x2F;press.princeton.edu&#x2F;titles&#x2F;5640.html</a><p>Robert Gallager&#x27;s MIT lecture series, very well presented, titled Principles of Digital Communications, takes you on another train based on Markov Chains (Kalman filters, etc).<p><a href="https:&#x2F;&#x2F;ocw.mit.edu&#x2F;courses&#x2F;electrical-engineering-and-computer-science&#x2F;6-450-principles-of-digital-communications-i-fall-2006&#x2F;" rel="nofollow">https:&#x2F;&#x2F;ocw.mit.edu&#x2F;courses&#x2F;electrical-engineering-and-compu...</a>
activatedgeek大约 6 年前
Markov chains in essence are simple. Instead of diverging and reading all the theory, I&#x27;d recommend do it on a need basis. Learn as you go. So pick up a problem and move ahead. I don&#x27;t think it is fruitful to just learn everything about Markov Chains just for the sake of it.<p>Markov Chain Monte Carlo to sample from probability distributions is a good start - <a href="https:&#x2F;&#x2F;arxiv.org&#x2F;abs&#x2F;1206.1901" rel="nofollow">https:&#x2F;&#x2F;arxiv.org&#x2F;abs&#x2F;1206.1901</a> if you are into sampling.
评论 #19636739 未加载
thedevindevops大约 6 年前
Tough one, I&#x27;d have to say:<p>45% <a href="http:&#x2F;&#x2F;setosa.io&#x2F;ev&#x2F;markov-chains&#x2F;" rel="nofollow">http:&#x2F;&#x2F;setosa.io&#x2F;ev&#x2F;markov-chains&#x2F;</a><p>30% <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Markov_chain" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Markov_chain</a><p>25% Youtube
评论 #19635394 未加载
usgroup大约 6 年前
1. Elementary probability theory.<p>2. Poisson processes.<p>3. The Markov property.<p>4. Stochastic processes.<p>5. Realise that you’re missing a background in analysis, therefore you don’t know sh?t about measure theory but you actually need it to know anything deeper . Wonder to yourself if you really want to spend the next 3 years getting a maths background you don’t have.<p>6. Convince yourself that it’s all just engineering and middle through by picking a project involving non trivial markov chain.<p>7. Go back and spend 3 years doing foundational maths then repeat point 1-5.
评论 #19634700 未加载
评论 #19635641 未加载
评论 #19634746 未加载
评论 #19636886 未加载
评论 #19636910 未加载
YorkshireSeason大约 6 年前
If you are not already intimately familiar with them learn about FSA (= finite state automata), aka FSM (finite state machines).<p>Most interesting facts about Markov chains (e.g. the <i>Stationary Distribution Theorem</i>) really are probabilistic generalisations of simpler facts about FSAs (e.g. FSAs cannot be used to &quot;count&quot;). In my experience, understanding them first for FSAs and then seeing how they generalise for the probabilitic case is a good way of approaching this subject.
Vaslo大约 6 年前
Here is an excellent place to start:<p><a href="http:&#x2F;&#x2F;setosa.io&#x2F;ev&#x2F;markov-chains&#x2F;" rel="nofollow">http:&#x2F;&#x2F;setosa.io&#x2F;ev&#x2F;markov-chains&#x2F;</a>
评论 #19634906 未加载
notinventedhear大约 6 年前
For a broad introduction to Bayesian analysis, MCMC and PyMC I&#x27;d suggest Bayesian Methods for Hackers[1]<p>[1] <a href="http:&#x2F;&#x2F;camdavidsonpilon.github.io&#x2F;Probabilistic-Programming-and-Bayesian-Methods-for-Hackers&#x2F;" rel="nofollow">http:&#x2F;&#x2F;camdavidsonpilon.github.io&#x2F;Probabilistic-Programming-...</a>
localhostdotdev大约 6 年前
markov chains are very simple at their core (e.g. simple version could be: take the probability of the next word given the known probabilities of words that follow the previous word)<p>it can be implemented in a few lines of code, that&#x27;s the beauty of it: <a href="https:&#x2F;&#x2F;github.com&#x2F;justindomingue&#x2F;markov_chains&#x2F;blob&#x2F;master&#x2F;lib&#x2F;markov_chains&#x2F;dictionary.rb" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;justindomingue&#x2F;markov_chains&#x2F;blob&#x2F;master&#x2F;...</a><p>obviously then you could take the previous n words into account, tweak the starting word, add randomness, etc.<p>now replace &quot;word&quot; with &quot;state&quot; and &quot;probability(next state | previous state)&quot; to edges of a graph: <a href="https:&#x2F;&#x2F;static1.squarespace.com&#x2F;static&#x2F;54e50c15e4b058fc6806d068&#x2F;t&#x2F;5650d16ee4b033f56d20ae6b&#x2F;1459882428797&#x2F;markov+chain+graph+all.png?format=1500w" rel="nofollow">https:&#x2F;&#x2F;static1.squarespace.com&#x2F;static&#x2F;54e50c15e4b058fc6806d...</a><p>and you got a generic markov chain :)<p>footnotes: p(A | B) is probability of A given B, e.g. p(rain | clouds) &gt; p(rain | sun) :)
crshults大约 6 年前
I thought this recent post: &#x27;Generating More of My Favorite Aphex Twin Track&#x27;[1] had a good beginner-level write up on Markov Chains. [1]<a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=19490832" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=19490832</a>
nrjames大约 6 年前
What I would do is use the Markovify python library and feed it with several texts from Project Gutenberg... try to generate some Lovecraftian prose or something...<p><a href="https:&#x2F;&#x2F;github.com&#x2F;jsvine&#x2F;markovify" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;jsvine&#x2F;markovify</a>
YeGoblynQueenne大约 6 年前
Personally, I started with Eugene Charniak&#x27;s Statistical Language Learning [1] then continued with Manning and Schütze&#x27;s Foundations of Statistical Natural Language Processing [2] and Speech and Language Processing by Jurafsky and Martin [3].<p>The Charniak book is primarily about HMMs and quite short, so it&#x27;s the best introduction to the subject. Manning and Schütze and Jurafsky and Martin are much more extensive and cover pretty much all of statistical NLP up to their publication date (so no LSTMs if I remember correctly) but they are required reading for an in-depth approach.<p>You will definitely want to go beyond HMMs at some point, so you will probably want the other two books. But, if you really just want to know about HMMs, then start with the Charniak.<p>______________<p>[1] <a href="https:&#x2F;&#x2F;mitpress.mit.edu&#x2F;books&#x2F;statistical-language-learning" rel="nofollow">https:&#x2F;&#x2F;mitpress.mit.edu&#x2F;books&#x2F;statistical-language-learning</a><p>[2] <a href="https:&#x2F;&#x2F;nlp.stanford.edu&#x2F;fsnlp&#x2F;" rel="nofollow">https:&#x2F;&#x2F;nlp.stanford.edu&#x2F;fsnlp&#x2F;</a><p>[3] <a href="https:&#x2F;&#x2F;web.stanford.edu&#x2F;~jurafsky&#x2F;slp3&#x2F;" rel="nofollow">https:&#x2F;&#x2F;web.stanford.edu&#x2F;~jurafsky&#x2F;slp3&#x2F;</a>
evmar大约 6 年前
For hidden Markov models (which only look into after you get the basics), I recall that this widely-cited paper (perhaps the original?) is pretty readable. From the title it looks like it&#x27;s about speech but ignore the speech parts and read the math:<p><a href="https:&#x2F;&#x2F;www.robots.ox.ac.uk&#x2F;~vgg&#x2F;rg&#x2F;papers&#x2F;hmm.pdf" rel="nofollow">https:&#x2F;&#x2F;www.robots.ox.ac.uk&#x2F;~vgg&#x2F;rg&#x2F;papers&#x2F;hmm.pdf</a>
danaugrs大约 6 年前
I really like this short, relaxed video: &quot;Information Theory part 10: What is a Markov chain?&quot; by Art of the Problem <a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=o-jdJxXL_W4" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=o-jdJxXL_W4</a><p>If you like it I recommend watching the whole series.
jotaf大约 6 年前
These are my favorite lecture notes, they assume almost no a-priori knowledge (with an awesome review of basic probabilities) and yet they don&#x27;t shy away from explaining all the rigorous math.<p>If you have time to read step-by-step derivations and want to understand the fundamentals, I think this is an excellent self-contained resource.<p><a href="https:&#x2F;&#x2F;ermongroup.github.io&#x2F;cs228-notes&#x2F;" rel="nofollow">https:&#x2F;&#x2F;ermongroup.github.io&#x2F;cs228-notes&#x2F;</a>
评论 #19634727 未加载
twiecki大约 6 年前
If you are looking for an explanation of MCMC that focuses on intuitive understanding to complement more mathematical introductions, I wrote a blog post trying to explain things in simple terms here: <a href="https:&#x2F;&#x2F;twiecki.io&#x2F;blog&#x2F;2015&#x2F;11&#x2F;10&#x2F;mcmc-sampling&#x2F;" rel="nofollow">https:&#x2F;&#x2F;twiecki.io&#x2F;blog&#x2F;2015&#x2F;11&#x2F;10&#x2F;mcmc-sampling&#x2F;</a>
ivan_ah大约 6 年前
If you&#x27;re interested in a basic math intro (starting from linear algebra concepts), check out Section 8.2 in this excerpt from the book &quot;No Bullshit guide to Linear Algebra&quot;: <a href="https:&#x2F;&#x2F;minireference.com&#x2F;static&#x2F;excerpts&#x2F;probability_chapter.pdf#page=12" rel="nofollow">https:&#x2F;&#x2F;minireference.com&#x2F;static&#x2F;excerpts&#x2F;probability_chapte...</a> This excerpt contains some exercises (with answers in the back) as well an examples application (PageRank).<p>Technically Linear Algebra is not &quot;required&quot; to understand Markov Chains, but it&#x27;s a very neat way to think about them: each &quot;step&quot; in the chain is equivalent to multiplication of the state vector by the transition matrix.
maurits大约 6 年前
My personal favorite introduction to MC(MC) is lecture 1 of statistical mechanics and computations [1]<p>[1]: <a href="https:&#x2F;&#x2F;www.coursera.org&#x2F;learn&#x2F;statistical-mechanics" rel="nofollow">https:&#x2F;&#x2F;www.coursera.org&#x2F;learn&#x2F;statistical-mechanics</a>
melling大约 6 年前
I’ve got a couple of links here:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;melling&#x2F;MathAndScienceNotes&#x2F;tree&#x2F;master&#x2F;statistics" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;melling&#x2F;MathAndScienceNotes&#x2F;tree&#x2F;master&#x2F;s...</a>
jerednel大约 6 年前
I learned quite a bit by exploring attribution modeling with them. There is an R package where you can just faceroll a model without really understanding anything so I tried recreating it in Python <a href="https:&#x2F;&#x2F;github.com&#x2F;jerednel&#x2F;markov-chain-attribution" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;jerednel&#x2F;markov-chain-attribution</a> - its messy for sure but it is a learning exercise and it helped me understand the concept quite a bit. That currently only supports the simplest use case of a first order markov chain.
jamesb93大约 6 年前
Make one with a direct application. I did one to model melody from Bach in a stupid way. It was made in Max, so I can&#x27;t provide the size of the code in any meaningful way, but its basically just a text file with an index and a number of possibilities related to that index.<p><a href="https:&#x2F;&#x2F;soundcloud.com&#x2F;jamesbradbury&#x2F;9th-order-markov-chain-of-bach" rel="nofollow">https:&#x2F;&#x2F;soundcloud.com&#x2F;jamesbradbury&#x2F;9th-order-markov-chain-...</a>
sublimino大约 6 年前
Markov Chains can be quite amusing when applied to a corpus of similar texts, and often stunningly human-like. I maintain a list of humourous applications: <a href="https:&#x2F;&#x2F;github.com&#x2F;sublimino&#x2F;awesome-funny-markov" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;sublimino&#x2F;awesome-funny-markov</a><p>Some favourites:<p>- Erowid trip reports and tech recruiter emails - <a href="https:&#x2F;&#x2F;twitter.com&#x2F;erowidrecruiter" rel="nofollow">https:&#x2F;&#x2F;twitter.com&#x2F;erowidrecruiter</a><p>- Calvin and Markov - Calvin and Hobbes strips reimagined <a href="http:&#x2F;&#x2F;joshmillard.com&#x2F;markov&#x2F;calvin&#x2F;" rel="nofollow">http:&#x2F;&#x2F;joshmillard.com&#x2F;markov&#x2F;calvin&#x2F;</a><p>- Generate your future tweets based on the DNA of your existing messages - <a href="http:&#x2F;&#x2F;yes.thatcan.be&#x2F;my&#x2F;next&#x2F;tweet&#x2F;" rel="nofollow">http:&#x2F;&#x2F;yes.thatcan.be&#x2F;my&#x2F;next&#x2F;tweet&#x2F;</a><p>- Fake headlines created by smashing up real headlines - <a href="https:&#x2F;&#x2F;www.headlinesmasher.com&#x2F;best&#x2F;all" rel="nofollow">https:&#x2F;&#x2F;www.headlinesmasher.com&#x2F;best&#x2F;all</a><p>- The most confusing subreddit (often on the front page) - <a href="https:&#x2F;&#x2F;www.reddit.com&#x2F;r&#x2F;subredditsimulator" rel="nofollow">https:&#x2F;&#x2F;www.reddit.com&#x2F;r&#x2F;subredditsimulator</a><p>The original Markov-generated content prank: &quot;I Spent an Interesting Evening Recently with a Grain of Salt&quot; <a href="https:&#x2F;&#x2F;web.archive.org&#x2F;web&#x2F;20011101013348&#x2F;http:&#x2F;&#x2F;www.sincity.com&#x2F;penn-n-teller&#x2F;pcc&#x2F;shaney.html" rel="nofollow">https:&#x2F;&#x2F;web.archive.org&#x2F;web&#x2F;20011101013348&#x2F;http:&#x2F;&#x2F;www.sincit...</a><p>And of course (un-amusingly!) - Google&#x27;s PageRank algorithm is built on Markov Chains <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;PageRank#Damping_factor" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;PageRank#Damping_factor</a><p>n.b. there used to be parodies of Hacker News, but both are down: <a href="https:&#x2F;&#x2F;news.ycombniator.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;news.ycombniator.com&#x2F;</a> and <a href="https:&#x2F;&#x2F;lou.wtf&#x2F;phaker-news" rel="nofollow">https:&#x2F;&#x2F;lou.wtf&#x2F;phaker-news</a>
maxmouchet大约 6 年前
For an introduction to discrete and continuous-time Markov chains, as well as an application to queuing theory, you can check the MOOC &quot;Queuing Theory: from Markov Chains to Multi-Server Systems&quot; on edX [1].<p>[1] <a href="https:&#x2F;&#x2F;www.classcentral.com&#x2F;course&#x2F;edx-queuing-theory-from-markov-chains-to-multi-server-systems-10079" rel="nofollow">https:&#x2F;&#x2F;www.classcentral.com&#x2F;course&#x2F;edx-queuing-theory-from-...</a>
thepill大约 6 年前
<a href="http:&#x2F;&#x2F;setosa.io&#x2F;ev&#x2F;markov-chains&#x2F;" rel="nofollow">http:&#x2F;&#x2F;setosa.io&#x2F;ev&#x2F;markov-chains&#x2F;</a>
DanBC大约 6 年前
Not sure it&#x27;s introductory, but A Mathematical Theory of Communication, page 5 onwards, is useful: <a href="http:&#x2F;&#x2F;www.math.harvard.edu&#x2F;~ctm&#x2F;home&#x2F;text&#x2F;others&#x2F;shannon&#x2F;entropy&#x2F;entropy.pdf" rel="nofollow">http:&#x2F;&#x2F;www.math.harvard.edu&#x2F;~ctm&#x2F;home&#x2F;text&#x2F;others&#x2F;shannon&#x2F;en...</a>
segmondy大约 6 年前
The wikipedia page is actually good and how I learned about it. <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Markov_chain" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Markov_chain</a> follow through with some random googling, read then implement it. It&#x27;s really simple for something that sounds so fancy. :)
mindcrime大约 6 年前
David Silver&#x27;s course on Reinforcement Learning contains some good information on Markov processes. See Lecture #2 in particular.<p><a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;playlist?list=PL7-jPKtc4r78-wCZcQn5IqyuWhBZ8fOxT" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;playlist?list=PL7-jPKtc4r78-wCZcQn5I...</a>
platz大约 6 年前
-- Markov Decision Processes<p>there is a lot of info out there about markov chains, but very little about markov decision processes (MDP).<p>How popular are MDP? What are their strengths? weaknesses?<p>-- Kalman Filters vs HMM (Hidden Markov Model):<p>&quot;In both models, there&#x27;s an unobserved state that changes over time according to relatively simple rules, and you get indirect information about that state every so often. In Kalman filters, you assume the unobserved state is Gaussian-ish and it moves continuously according to linear-ish dynamics (depending on which flavor of Kalman filter is being used). In HMMs, you assume the hidden state is one of a few classes, and the movement among these states uses a discrete Markov chain. In my experience, the algorithms are often pretty different for these two cases, but the underlying idea is very similar.&quot; - THISISDAVE<p>-- HMM vs LSTM&#x2F;RNN:<p>&quot;Some state-of-the-art industrial speech recognition [0] is transitioning from HMM-DNN systems to &quot;CTC&quot; (connectionist temporal classification), i.e., basically LSTMs. Kaldi is working on &quot;nnet3&quot; which moves to CTC, as well. Speech was one of the places where HMMs were _huge_, so that&#x27;s kind of a big deal.&quot; -PRACCU<p>&quot;HMMs are only a small subset of generative models that offers quite little expressiveness in exchange for efficient learning and inference.&quot; - NEXTOS<p>&quot;IMO, anything that be done with an HMM can now be done with an RNN. The only advantage that an HMM might have is that training it might be faster using cheaper computational resources. But if you have the $$$ to get yourself a GPU or two, this computational advantage disappears for HMMs.&quot; - SHERJILOZAIR
micheda大约 6 年前
The hmm_filter project implements Viterbi-inspired algorithms and transition matrices in Python, might be also a useful learning resource: <a href="https:&#x2F;&#x2F;github.com&#x2F;minodes&#x2F;hmm_filter" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;minodes&#x2F;hmm_filter</a>
orasis大约 6 年前
The most important thing is to realize just how damn simple they are. As you get mired in the literature everything will seem overwhelmingly complex. Just grok the very very basic idea of them and it will come easier.<p>Also, they’re just a convenient model (for some problems), not a holy truth.
AlexCoventry大约 6 年前
You could try Gelman et al.&#x27;s <i>Bayesian Data Analysis</i>. It has a good overview of MCMC.<p>If you want an overview of Markov chains as statistical models in their own right, Durbin et al.&#x27;s <i>Biological Sequence Analysis</i> is a well-motivated overview.
ggggtez大约 6 年前
There isn&#x27;t really very much to learn. Just start on wikipedia, and expand out if you think there is something more. Markov Chains are very simple in practice.
i_am_proteus大约 6 年前
If the &quot;motivation-theorem-proof&quot; style appeals to you, find a copy of <i>Finite Markov Chains</i> by Kemeny and Snell. ISBN 0442043287
ackbar03大约 6 年前
How about a textbook maybe? There aren&#x27;t always easy alternatives out there, sometimes you have to bite the bullet and do the work
tnecniv大约 6 年前
Do you have an application in mind to help guide suggestions?<p>As others have said, if you know know probability, start there.
currymj大约 6 年前
You can find a copy of “Markov Chains and Mixing Times” online, which is good and relatively accessible.
graycat大约 6 年前
E. Cinlar, <i>Introduction to Stochastic Processes</i><p>Covers limit theorems and continuous time.