From 6f3a973657b0d3f92bea63b154eadd1590b98e1e Mon Sep 17 00:00:00 2001 From: Cameron Davidson-Pilon Date: Wed, 7 Jan 2015 20:43:31 -0500 Subject: [PATCH 1/2] Rename to consistent files. About to drop pdf support --- .../{Chapter1_Introduction.ipynb => Chapter1.ipynb} | 0 Chapter1_Introduction/README.md | 2 +- Chapter2_MorePyMC/{MorePyMC.ipynb => Chapter2.ipynb} | 0 Chapter2_MorePyMC/README.md | 2 +- Chapter3_MCMC/{IntroMCMC.ipynb => Chapter3.ipynb} | 0 Chapter3_MCMC/README.md | 2 +- .../{LawOfLargeNumbers.ipynb => Chapter4.ipynb} | 0 Chapter4_TheGreatestTheoremNeverTold/README.md | 2 +- .../{LossFunctions.ipynb => Chapter5.ipynb} | 0 Chapter5_LossFunctions/README.md | 2 +- Chapter6_Priorities/{Priors.ipynb => Chapter6.ipynb} | 0 Chapter6_Priorities/README.md | 2 +- README.md | 12 ++++++------ to_latex_pdf.sh | 7 +++++++ 14 files changed, 19 insertions(+), 12 deletions(-) rename Chapter1_Introduction/{Chapter1_Introduction.ipynb => Chapter1.ipynb} (100%) rename Chapter2_MorePyMC/{MorePyMC.ipynb => Chapter2.ipynb} (100%) rename Chapter3_MCMC/{IntroMCMC.ipynb => Chapter3.ipynb} (100%) rename Chapter4_TheGreatestTheoremNeverTold/{LawOfLargeNumbers.ipynb => Chapter4.ipynb} (100%) rename Chapter5_LossFunctions/{LossFunctions.ipynb => Chapter5.ipynb} (100%) rename Chapter6_Priorities/{Priors.ipynb => Chapter6.ipynb} (100%) create mode 100755 to_latex_pdf.sh diff --git a/Chapter1_Introduction/Chapter1_Introduction.ipynb b/Chapter1_Introduction/Chapter1.ipynb similarity index 100% rename from Chapter1_Introduction/Chapter1_Introduction.ipynb rename to Chapter1_Introduction/Chapter1.ipynb diff --git a/Chapter1_Introduction/README.md b/Chapter1_Introduction/README.md index 4aa18c55..e5efae3b 100644 --- a/Chapter1_Introduction/README.md +++ b/Chapter1_Introduction/README.md @@ -1,4 +1,4 @@ Chapter 1: Introduction to Bayesian Methods =========== -### [Read it online here](http://nbviewer.ipython.org/urls/raw.github.com/CamDavidsonPilon/Probabilistic-Programming-and-Bayesian-Methods-for-Hackers/master/Chapter1_Introduction/Chapter1_Introduction.ipynb) +### [Read it online here](http://nbviewer.ipython.org/urls/raw.github.com/CamDavidsonPilon/Probabilistic-Programming-and-Bayesian-Methods-for-Hackers/master/Chapter1_Introduction/Chapter1.ipynb) diff --git a/Chapter2_MorePyMC/MorePyMC.ipynb b/Chapter2_MorePyMC/Chapter2.ipynb similarity index 100% rename from Chapter2_MorePyMC/MorePyMC.ipynb rename to Chapter2_MorePyMC/Chapter2.ipynb diff --git a/Chapter2_MorePyMC/README.md b/Chapter2_MorePyMC/README.md index 37910b9f..3d434086 100644 --- a/Chapter2_MorePyMC/README.md +++ b/Chapter2_MorePyMC/README.md @@ -1,4 +1,4 @@ Chapter 2: A little more on PyMC ================================= -### [Read it online here](http://nbviewer.ipython.org/urls/raw.github.com/CamDavidsonPilon/Probabilistic-Programming-and-Bayesian-Methods-for-Hackers/master/Chapter2_MorePyMC/MorePyMC.ipynb) +### [Read it online here](http://nbviewer.ipython.org/urls/raw.github.com/CamDavidsonPilon/Probabilistic-Programming-and-Bayesian-Methods-for-Hackers/master/Chapter2_MorePyMC/Chapter2.ipynb) diff --git a/Chapter3_MCMC/IntroMCMC.ipynb b/Chapter3_MCMC/Chapter3.ipynb similarity index 100% rename from Chapter3_MCMC/IntroMCMC.ipynb rename to Chapter3_MCMC/Chapter3.ipynb diff --git a/Chapter3_MCMC/README.md b/Chapter3_MCMC/README.md index 52910479..3e270f67 100644 --- a/Chapter3_MCMC/README.md +++ b/Chapter3_MCMC/README.md @@ -1,4 +1,4 @@ Chapter 3: Opening the black box of MCMC (Markov Chain Monte Carlo) ================================================================== -### [Read it online here](http://nbviewer.ipython.org/urls/raw.github.com/CamDavidsonPilon/Probabilistic-Programming-and-Bayesian-Methods-for-Hackers/master/Chapter3_MCMC/IntroMCMC.ipynb) +### [Read it online here](http://nbviewer.ipython.org/urls/raw.github.com/CamDavidsonPilon/Probabilistic-Programming-and-Bayesian-Methods-for-Hackers/master/Chapter3_MCMC/Chapter3.ipynb) diff --git a/Chapter4_TheGreatestTheoremNeverTold/LawOfLargeNumbers.ipynb b/Chapter4_TheGreatestTheoremNeverTold/Chapter4.ipynb similarity index 100% rename from Chapter4_TheGreatestTheoremNeverTold/LawOfLargeNumbers.ipynb rename to Chapter4_TheGreatestTheoremNeverTold/Chapter4.ipynb diff --git a/Chapter4_TheGreatestTheoremNeverTold/README.md b/Chapter4_TheGreatestTheoremNeverTold/README.md index 74bff691..60c3d501 100644 --- a/Chapter4_TheGreatestTheoremNeverTold/README.md +++ b/Chapter4_TheGreatestTheoremNeverTold/README.md @@ -1,3 +1,3 @@ Chapter 4: The Greatest Theorem Never Told ==== -### [Read it online here](http://nbviewer.ipython.org/urls/raw.github.com/CamDavidsonPilon/Probabilistic-Programming-and-Bayesian-Methods-for-Hackers/master/Chapter4_TheGreatestTheoremNeverTold/LawOfLargeNumbers.ipynb) +### [Read it online here](http://nbviewer.ipython.org/urls/raw.github.com/CamDavidsonPilon/Probabilistic-Programming-and-Bayesian-Methods-for-Hackers/master/Chapter4_TheGreatestTheoremNeverTold/Chapter4.ipynb) diff --git a/Chapter5_LossFunctions/LossFunctions.ipynb b/Chapter5_LossFunctions/Chapter5.ipynb similarity index 100% rename from Chapter5_LossFunctions/LossFunctions.ipynb rename to Chapter5_LossFunctions/Chapter5.ipynb diff --git a/Chapter5_LossFunctions/README.md b/Chapter5_LossFunctions/README.md index db5d2880..a2b79ac2 100644 --- a/Chapter5_LossFunctions/README.md +++ b/Chapter5_LossFunctions/README.md @@ -1,4 +1,4 @@ Chapter 5: Would you rather lose an arm or a leg? ==== -### [Read it online here](http://nbviewer.ipython.org/urls/raw.github.com/CamDavidsonPilon/Probabilistic-Programming-and-Bayesian-Methods-for-Hackers/master/Chapter5_LossFunctions/LossFunctions.ipynb) +### [Read it online here](http://nbviewer.ipython.org/urls/raw.github.com/CamDavidsonPilon/Probabilistic-Programming-and-Bayesian-Methods-for-Hackers/master/Chapter5_LossFunctions/Chapter5.ipynb) diff --git a/Chapter6_Priorities/Priors.ipynb b/Chapter6_Priorities/Chapter6.ipynb similarity index 100% rename from Chapter6_Priorities/Priors.ipynb rename to Chapter6_Priorities/Chapter6.ipynb diff --git a/Chapter6_Priorities/README.md b/Chapter6_Priorities/README.md index 4c83950a..dd473e90 100644 --- a/Chapter6_Priorities/README.md +++ b/Chapter6_Priorities/README.md @@ -1,4 +1,4 @@ Chapter 6: Getting our priorities straight =========== -### [Read it online here](http://nbviewer.ipython.org/urls/raw.github.com/CamDavidsonPilon/Probabilistic-Programming-and-Bayesian-Methods-for-Hackers/master/Chapter6_Priorities/Priors.ipynb) +### [Read it online here](http://nbviewer.ipython.org/urls/raw.github.com/CamDavidsonPilon/Probabilistic-Programming-and-Bayesian-Methods-for-Hackers/master/Chapter6_Priorities/Chapter6.ipynb) diff --git a/README.md b/README.md index 438244f9..752e98d0 100644 --- a/README.md +++ b/README.md @@ -35,31 +35,31 @@ Interactive notebooks + examples can be downloaded by cloning! * [**Prologue:**](http://nbviewer.ipython.org/urls/raw.github.com/CamDavidsonPilon/Probabilistic-Programming-and-Bayesian-Methods-for-Hackers/master/Prologue/Prologue.ipynb) Why we do it. -* [**Chapter 1: Introduction to Bayesian Methods**](http://nbviewer.ipython.org/urls/raw.github.com/CamDavidsonPilon/Probabilistic-Programming-and-Bayesian-Methods-for-Hackers/master/Chapter1_Introduction/Chapter1_Introduction.ipynb) +* [**Chapter 1: Introduction to Bayesian Methods**](http://nbviewer.ipython.org/urls/raw.github.com/CamDavidsonPilon/Probabilistic-Programming-and-Bayesian-Methods-for-Hackers/master/Chapter1_Introduction/Chapter1.ipynb) Introduction to the philosophy and practice of Bayesian methods and answering the question, "What is probabilistic programming?" Examples include: - Inferring human behaviour changes from text message rates -* [**Chapter 2: A little more on PyMC**](http://nbviewer.ipython.org/urls/raw.github.com/CamDavidsonPilon/Probabilistic-Programming-and-Bayesian-Methods-for-Hackers/master/Chapter2_MorePyMC/MorePyMC.ipynb) +* [**Chapter 2: A little more on PyMC**](http://nbviewer.ipython.org/urls/raw.github.com/CamDavidsonPilon/Probabilistic-Programming-and-Bayesian-Methods-for-Hackers/master/Chapter2_MorePyMC/Chapter2.ipynb) We explore modeling Bayesian problems using Python's PyMC library through examples. How do we create Bayesian models? Examples include: - Detecting the frequency of cheating students, while avoiding liars - Calculating probabilities of the Challenger space-shuttle disaster -* [**Chapter 3: Opening the Black Box of MCMC**](http://nbviewer.ipython.org/urls/raw.github.com/CamDavidsonPilon/Probabilistic-Programming-and-Bayesian-Methods-for-Hackers/master/Chapter3_MCMC/IntroMCMC.ipynb) +* [**Chapter 3: Opening the Black Box of MCMC**](http://nbviewer.ipython.org/urls/raw.github.com/CamDavidsonPilon/Probabilistic-Programming-and-Bayesian-Methods-for-Hackers/master/Chapter3_MCMC/Chapter3.ipynb) We discuss how MCMC operates and diagnostic tools. Examples include: - Bayesian clustering with mixture models -* [**Chapter 4: The Greatest Theorem Never Told**](http://nbviewer.ipython.org/urls/raw.github.com/CamDavidsonPilon/Probabilistic-Programming-and-Bayesian-Methods-for-Hackers/master/Chapter4_TheGreatestTheoremNeverTold/LawOfLargeNumbers.ipynb) +* [**Chapter 4: The Greatest Theorem Never Told**](http://nbviewer.ipython.org/urls/raw.github.com/CamDavidsonPilon/Probabilistic-Programming-and-Bayesian-Methods-for-Hackers/master/Chapter4_TheGreatestTheoremNeverTold/Chapter4.ipynb) We explore an incredibly useful, and dangerous, theorem: The Law of Large Numbers. Examples include: - Exploring a Kaggle dataset and the pitfalls of naive analysis - How to sort Reddit comments from best to worst (not as easy as you think) -* [**Chapter 5: Would you rather lose an arm or a leg?**](http://nbviewer.ipython.org/urls/raw.github.com/CamDavidsonPilon/Probabilistic-Programming-and-Bayesian-Methods-for-Hackers/master/Chapter5_LossFunctions/LossFunctions.ipynb) +* [**Chapter 5: Would you rather lose an arm or a leg?**](http://nbviewer.ipython.org/urls/raw.github.com/CamDavidsonPilon/Probabilistic-Programming-and-Bayesian-Methods-for-Hackers/master/Chapter5_LossFunctions/Chapter5.ipynb) The introduction of loss functions and their (awesome) use in Bayesian methods. Examples include: - Solving the *Price is Right*'s Showdown - Optimizing financial predictions - Winning solution to the Kaggle Dark World's competition -* [**Chapter 6: Getting our *prior*-ities straight**](http://nbviewer.ipython.org/urls/raw.github.com/CamDavidsonPilon/Probabilistic-Programming-and-Bayesian-Methods-for-Hackers/master/Chapter6_Priorities/Priors.ipynb) +* [**Chapter 6: Getting our *prior*-ities straight**](http://nbviewer.ipython.org/urls/raw.github.com/CamDavidsonPilon/Probabilistic-Programming-and-Bayesian-Methods-for-Hackers/master/Chapter6_Priorities/Chapter6.ipynb) Probably the most important chapter. We draw on expert opinions to answer questions. Examples include: - Multi-Armed Bandits and the Bayesian Bandit solution. - What is the relationship between data sample size and prior? diff --git a/to_latex_pdf.sh b/to_latex_pdf.sh new file mode 100755 index 00000000..690faea7 --- /dev/null +++ b/to_latex_pdf.sh @@ -0,0 +1,7 @@ +workon data +cd Chapter1_Introduction/ && ipython nbconvert Chapter1.ipynb --to latex --post PDF --template article +cd ../Chapter2_MorePyMC/ && ipython nbconvert Chapter2.ipynb --to latex --post PDF --template article +cd ../Chapter3_MCMC/ && ipython nbconvert Chapter3.ipynb --to latex --post PDF --template article +cd ../Chapter4_TheGreatestTheoremNeverTold/ && ipython nbconvert Chapter4.ipynb --to latex --post PDF --template article +cd ../Chapter5_LossFunctions/ && ipython nbconvert Chapter5.ipynb --to latex --post PDF --template article +cd ../Chapter6_Priorities/ && ipython nbconvert Chapter6.ipynb --to latex --post PDF --template article From 911f7531193d696a0949320a351bab88040fa6b0 Mon Sep 17 00:00:00 2001 From: Cameron Davidson-Pilon Date: Wed, 7 Jan 2015 20:44:55 -0500 Subject: [PATCH 2/2] remove virtualenv command --- to_latex_pdf.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/to_latex_pdf.sh b/to_latex_pdf.sh index 690faea7..32227826 100755 --- a/to_latex_pdf.sh +++ b/to_latex_pdf.sh @@ -1,5 +1,4 @@ -workon data -cd Chapter1_Introduction/ && ipython nbconvert Chapter1.ipynb --to latex --post PDF --template article +gcd Chapter1_Introduction/ && ipython nbconvert Chapter1.ipynb --to latex --post PDF --template article cd ../Chapter2_MorePyMC/ && ipython nbconvert Chapter2.ipynb --to latex --post PDF --template article cd ../Chapter3_MCMC/ && ipython nbconvert Chapter3.ipynb --to latex --post PDF --template article cd ../Chapter4_TheGreatestTheoremNeverTold/ && ipython nbconvert Chapter4.ipynb --to latex --post PDF --template article