https://www.stat.cmu.edu/~cshalizi/uADA/12/lectures/ch23.pdf https://www.stat.cmu.edu/~cshalizi/uADA/12/lectures/ch24.pdf
link