<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Adolfo Martínez on Medium]]></title>
        <description><![CDATA[Stories by Adolfo Martínez on Medium]]></description>
        <link>https://medium.com/@arinarmo?source=rss-689c4b3d8fa8------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*fmTTxMDBMSRMldEs.jpg</url>
            <title>Stories by Adolfo Martínez on Medium</title>
            <link>https://medium.com/@arinarmo?source=rss-689c4b3d8fa8------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 02:12:49 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@arinarmo/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[A “quick” introduction to PyMC3 and Bayesian models, Part I]]></title>
            <link>https://arinarmo.medium.com/a-quick-introduction-to-pymc3-and-bayesian-models-part-i-65419bdffcd8?source=rss-689c4b3d8fa8------2</link>
            <guid isPermaLink="false">https://medium.com/p/65419bdffcd8</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[bayesian-statistics]]></category>
            <category><![CDATA[generative-model]]></category>
            <category><![CDATA[pymc3]]></category>
            <dc:creator><![CDATA[Adolfo Martínez]]></dc:creator>
            <pubDate>Fri, 20 Oct 2017 15:01:04 GMT</pubDate>
            <atom:updated>2021-01-11T17:17:51.395Z</atom:updated>
            <content:encoded><![CDATA[<p><em>In my </em><a href="https://blog.datank.ai/how-i-learned-to-stop-worrying-and-love-uncertainty-fd13c23442b6"><em>last post</em></a><em>, I talked about Bayesian Statistics and how they can help us quantify uncertainty in data analysis. In this post, I give a “brief”, practical introduction using a specific and hopefully relatable example drawn from real data.</em></p><p><em>For this series of posts, I will assume a basic knowledge of probability (particularly, Bayes theorem), as well as some familiarity with python. You can read up on those subjects </em><a href="https://brohrer.github.io/how_bayesian_inference_works.html"><em>here</em></a><em> and </em><a href="https://www.learnpython.org/"><em>here</em></a><em>, respectively. For a more in-depth probability course, I recommend </em><a href="https://www.amazon.com/First-Course-Probability-Sheldon-Ross/dp/9332519072/ref=sr_1_1?ie=UTF8&amp;qid=1507850932&amp;sr=8-1&amp;keywords=a+first+course+in+probability+9th+edition"><em>this book</em></a><em>. For a course in Bayesian statistics, get the </em><a href="https://www.amazon.com/Doing-Bayesian-Data-Analysis-Second/dp/0124058884"><em>puppy book</em></a><em>.</em></p><h3><strong>Waiting for a taxi</strong></h3><p>We’ve all been there, maybe 15 minutes before a meeting, at 4 AM after a party, or simply when we feel too lazy to walk. And even though apps like Uber have made it relatively painless, there are still times when it is necessary or practical to just wait for a taxi. So we wait, impatiently, probably while wondering how much we will have to wait.</p><h3>Modeling</h3><p>To answer this question in the frame of Bayesian statistics, we first must choose two things:</p><ol><li>A <strong>generative model</strong> for our possible observations</li><li>A <strong>prior distribution</strong> for the parameters of that model</li></ol><p>As the name implies, a generative model is a probability model which is able to generate data that looks a lot like the data we might gather from the phenomenon we’re trying to model. In our case, we need a model that generates data that looks like waiting times.</p><p>Fortunately, the exponential distribution, a very well-known continuous distribution, can be used to model waiting times for unscheduled arrivals due to the property of memorylessness, which means that, after waiting any amount of time, the distribution is the same than at the start.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/598/1*9rM1LNIjF-fZQkmiMTH4lQ.png" /><figcaption>An example of the exponential distribution. Most of the density is concentrated near zero.</figcaption></figure><p>This distribution has a single parameter λ, which indicates the expected rate at which the event occurs. We need to describe the prior information or belief about this parameter. For example, we know it’s positive (our taxi can’t arrive before we’re waiting for it!), it has no natural upper bound and depending on what we know (or believe) about it, we can choose any number of distributions to encode such knowledge. For simplicity, I choose again the exponential, in such a way that the expected rate of arrival is 1 taxi every 5 minutes.</p><p>Here’s how to do it in PyMC3. There’s also a <a href="https://github.com/arinarmo/pymc3_intro/blob/master/Part_I.ipynb">notebook</a> if you prefer to run the code yourself.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/5a1d916802f4b89e1279a47de986200d/href">https://medium.com/media/5a1d916802f4b89e1279a47de986200d/href</a></iframe><p>With these, we’re now able to generate some data that looks like waiting times and even answer questions about probability. However, there’s no guarantee about the accuracy of the answers. We need data for that.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/601/1*PdNmYwOBuG02Kg51wUp79g.png" /><figcaption>An example histogram of the waiting times we might generate from our model.</figcaption></figure><h3>Adding data</h3><p><em>(The data used in this post was gathered from the </em><a href="http://www.nyc.gov/html/tlc/html/technology/data.shtml"><em>NYC Taxi &amp; Limousine Commission</em></a><em>, and filtered to a specific month and corner, specifically, the first month of 2016, and the corner of 7th avenue with 33rd St)</em></p><p>Suppose that, miraculously, we have access to a month’s worth of data about taxi pickups, specifically, pickups near the corner where we’re waiting. We could look at the time between consecutive pickups and call it the waiting time for the next taxi arrival.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/608/1*vmAgyURxRg-5eJgtxewqGQ.png" /><figcaption>The histogram of our data. Note the shape of the distribution is similar to our generative model.</figcaption></figure><p>There’s an obvious problem with using these data to model waiting times for a person: that person is not necessarily waiting as soon as the previous taxi leaves, but rather arrives at some point between two pickups. Furthermore, many empty taxis may pass through the corner without picking anyone up. We’ll see how to deal with these problems in later posts. For now, though, let’s call it an approximate model and carry on.</p><p>Adding the data to our model in PyMC3 is as simple as adding a parameter:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b878a76d10bda556253680ac0d8afc15/href">https://medium.com/media/b878a76d10bda556253680ac0d8afc15/href</a></iframe><p>That’s it, we’re now ready to “train” our model and look at some results.</p><h3>Inference and answering questions</h3><p>Thanks to the Bayes theorem and our generative model, we can now draw samples from the <strong>posterior distribution</strong>, this is also straightforward in PyMC3</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a42dbc288e286c76bd281c1875a71437/href">https://medium.com/media/a42dbc288e286c76bd281c1875a71437/href</a></iframe><p>We can choose many different methods to draw from this distribution. In this case, I’m using the classic Metropolis algorithm, but PyMC3 also has other MCMC methods such as the Gibbs sampler and NUTS, as well as a great initializer in ADVI.</p><p>Let’s look at our posterior distribution:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/615/1*1m46IwJz93APlhSYxfgwTg.png" /><figcaption>The posterior distribution for the rate parameter. It encodes the uncertainty about it after observing the data.</figcaption></figure><p>With our posterior distribution, we can now answer questions about the rate parameter. For example, its expected value is around <em>0.152, </em>which works out to about 1 taxi every <em>6.5 </em>minutes, which is also the expected value of the expected waiting time. We can also look at probability intervals (there’s a <em>0.95</em> probability that the rate parameter is between <em>0.15 </em>and<em> 0.158</em>) or at thresholds (<em>0.99 </em>probability that it is below<em> 0.159</em>).</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/05348b018c647418e87877fb35a0730b/href">https://medium.com/media/05348b018c647418e87877fb35a0730b/href</a></iframe><p>It is tempting to try and draw direct conclusions about the waiting times from this distribution, but it would be a mistake. The posterior distribution is the representation of our knowledge of the parameters of the model, not about the phenomenon we’re modeling itself. In other words, it tells us how certain we are about our model. A flat posterior means we have not been able to find one good model, but rather that there are many possible models with similar “fit”.</p><p>To be able to answer questions about the phenomenon itself, we need the <strong>predictive</strong> <strong>distribution</strong>. This distribution adds the uncertainty about the parameters to the uncertainty present in the model itself, providing us with a proper way to measure the uncertainty of our predictions. We can draw samples from it with one line:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/0b0c3adc456ae2f7795cfdbb2d21eb57/href">https://medium.com/media/0b0c3adc456ae2f7795cfdbb2d21eb57/href</a></iframe><p>We can now ask questions such as:</p><ul><li>The expected waiting time: <em>6.57</em></li><li>The probability we wait more than 10 minutes: <em>0.21</em></li><li>The probability we wait less than a minute: <em>0.13</em></li></ul><p>Let’s also look at our posterior distribution. Note how it has a heavier tail than our data. This represents our uncertainty about our predictions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/601/1*YuBqDye9kZXSGfyAIjQIKQ.png" /><figcaption>Our posterior distribution. The slightly heavier tail implies we can’t rule out the probability of observing large waiting times, despite our data not showing a lot of them.</figcaption></figure><h3>What’s next?</h3><p>While this model can give us a lot of information, it is not very good at making predictions. This is to be expected because we’re not adding any feature or covariate that can help us predict our target better.</p><p>In the next post, we’ll see how to add features or covariates to a model. We’ll briefly talk about functional forms and will end with a note about prior selection.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=65419bdffcd8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How I Learned to Stop Worrying and Love Uncertainty]]></title>
            <link>https://medium.com/datank-ai-blog/how-i-learned-to-stop-worrying-and-love-uncertainty-fd13c23442b6?source=rss-689c4b3d8fa8------2</link>
            <guid isPermaLink="false">https://medium.com/p/fd13c23442b6</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[bayesian-statistics]]></category>
            <category><![CDATA[uncertainty]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Adolfo Martínez]]></dc:creator>
            <pubDate>Wed, 06 Sep 2017 22:19:20 GMT</pubDate>
            <atom:updated>2017-09-13T19:53:51.038Z</atom:updated>
            <content:encoded><![CDATA[<p><em>This is a written version of my talk at Software Guru’s DataDay 2017, the original slides (in Spanish) can be found </em><a href="https://github.com/arinarmo/love_uncertainty/releases"><em>here</em></a></p><h3>Humans and uncertainty</h3><p>Since their early days, humans have had an important, often antagonistic relationship with uncertainty; we try to kill it everywhere we find it. Without an explanation for many natural phenomena, humans invented gods to explain them, and without certainty of the future, they consulted oracles.</p><p>It was precisely the oracle’s role to reduce uncertainty for their fellow humans, predicting their future and giving counsel according to their gods’ will, and even though their accuracy left much to be desired, they were believed, for any measure of certainty is better than none.</p><p>As society grew sophisticated, oracles were (<a href="https://www.horoscope.com/us/index.aspx">not completely</a>) displaced by empiric thought, which proved much more successful at prediction and counsel. Empiricism itself evolved into the collection of techniques we call the scientific method, which has proven to be much more effective at reducing uncertainty, and is modern society’s most trustworthy way of producing predictions. Statistics play a central role in most of science, providing the main instrument for measuring evidence and evaluating hypotheses. (Although the mainstream approach is <a href="http://fivethirtyeight.com/features/statisticians-found-one-thing-they-can-agree-on-its-time-to-stop-misusing-p-values/">deeply flawed</a> in this regard).</p><p>Recently, advances in both statistical and computational theory and computing power have enabled the analysis of huge volumes of data, making predictions and recommendations possible without the need for a general theory, even leading some to proclaim that <a href="https://www.wired.com/2008/06/pb-theory/">the scientific method is obsolete</a>. Although I don’t agree, the power of this tools can’t be denied. This power, together with the complexity of both theory and practice that surrounds these tools, have turned those who wield it into the modern equivalent of oracles.</p><p>But tools have limitations, and the understanding of these is paramount for their users. In particular, I would like to talk about the limitations of two of the most popular tools for dealing with uncertainty: <strong>Frequentist Statistics</strong> and <strong>Supervised Learning.</strong></p><h3><strong>Frequentist Statistics and its Limitations</strong></h3><p>Frequentism is the notion that frequencies approximate probability. Most of us are taught this notion in high school: toss a coin a bunch of times, compute the frequency of heads, compare with the theoretical probability of heads for a fair coin, and so on. Following this idea, probabilities are defined as the limit of the frequency when the “random experiment” is repeated. The more you can repeat it, the better approximation of a probability you will have. The collection of techniques derived from this idea is used in most of science, with frequent success.</p><p>However, a problem with the frequentist definition of probability is that it can’t assign a probability to unique events since they cannot be repeated. Yet in an informal way, <a href="http://mentalmodels.princeton.edu/portfolio/unique-events/">people do assign such probabilities</a>, so it would be desirable for a statistical theory to be able to deal with them. Frequentism gets around that by thinking of a “frame of reference”, that is, assuming that similar events can be thought to at least approximately come from the same “random experiment” (Thus, a frequentist may answer the election question by looking at past, similar elections). Theoretical rigor is abandoned in favor of applicability.</p><p>A similar problem arises when one wishes to think about the likelihood of an unknown quantity, or the truth of a statement about the past or present. For example, the likelihood that a hypothesis is true. Such a likelihood is impossible to measure for frequentist statistics, so when the question (central in science) is posed “<em>How likely is it that this hypothesis is true, given these data?</em>”, a very theoretically weak technique is used: the<em> p-value.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1023/1*cOIu5Rzb0gGx48dD_2bWVQ.png" /><figcaption>A graphical explanation of the p-value (Credit: <a href="https://commons.wikimedia.org/w/index.php?curid=36661887">Repapetilto &amp; Chen-Pan Liao @ Wikipedia</a>)</figcaption></figure><p>The <em>p-value</em> can be (inaccurately) thought of as the answer to the question “<em>How likely would be the data I collected, given that my hypothesis was wrong?</em>”, the idea being that if it is really small, then maybe the hypothesis is true. Clearly, the two questions are not the same, yet most p-value users equate them. To explain the exact nature of the error here, an important theorem in probability is needed, which I will discuss soon.</p><h3><strong>Supervised Learning and its Limitations</strong></h3><p>A different approach can be taken, which assumes little to nothing about the nature of uncertainty and probability, and instead focuses its effort on producing the best prediction possible for a given task. This is the focus of <em>supervised learning (SL)</em>, a type of <em>machine learning (ML)</em>, which focuses on predicting a response variable <em>y </em>given a set of input variables (AKA features) <em>x</em>, observed on a dataset.</p><p>Mathematically, SL algorithms are trying to estimate the expected value of the response variable given the input variables, as a function of them, by adjusting parameters through observations of these variables. Many powerful methods have been devised to perform this task, and one must choose among a diversity of them depending on the nature of variables, dimensionality, and complexity of the phenomena which produces the data, among other things.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/438/1*BDIA6zfqhqd5iaM4i6RxdA.png" /><figcaption>An example of an SL task, solved by Linear Regression (Credit: <a href="https://commons.wikimedia.org/w/index.php?curid=11967659">Sewaqu</a>)</figcaption></figure><p>Because they are designed to do well on this problem, SL algorithms typically can’t deal with another type of questions. For example, one might wish to ask, given the input variables, how likely is it that the response rises above a given threshold. While this is a question that can be typically answered with a statistical model, not every ML model has a straightforward way to do it, and it is simply impossible for many.</p><p>Another problem that arises frequently when using some SL algorithms is the difficulty in interpreting their results. Take, for example, the multilayer perceptron, with many layers, an activation function per neuron (usually, per layer) and a lot of weights, it becomes quite difficult to explain what each parameter means, or pinpoint how a change in one of the inputs affects the response. Predictive power, in this case, comes at the cost of having to use the model as a sort of black box, its only task is to give out predictions, without context or interpretability.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/441/1*2zVy-_ssBjJFuAgc9qnlxg.png" /><figcaption>A multilayer perceptron (Credit: <a href="https://www.quora.com/What-is-the-role-of-the-activation-function-in-a-neural-network-How-does-this-function-in-a-human-neural-network-system/answer/Sebastian-Raschka-1?srid=Cdco">Sebastian Raschka</a>)</figcaption></figure><p>When we use predictive models as black boxes, without being aware of the assumptions they make about the data and the phenomenon, we risk falling into <strong>overcertainty</strong>. Since we know our predictions to be accurate (it is not uncommon for an ML algorithm to rise above 90% accuracy), but we don’t exactly know the inner workings of them, we tend to trust them completely, much as if they were oracles, and make decisions taking for granted their predictions.</p><p>Some examples of the consequences of overcertainty:</p><ul><li><a href="https://www.wired.com/2015/10/can-learn-epic-failure-google-flu-trends/">Google Flu Trends fails to “nowcast” the 2013 flu season</a></li><li><a href="https://bits.blogs.nytimes.com/2015/07/01/google-photos-mistakenly-labels-black-people-gorillas/">Google labels a picture of black people as ‘Gorillas’</a></li><li><a href="https://www.theguardian.com/technology/2016/jun/30/tesla-autopilot-death-self-driving-car-elon-musk">A driver dies in fatal crash while trusting Tesla’s autopilot</a></li></ul><p>A way to deal with overcertainty is to account for uncertainty, measuring and presenting it instead of reducing and hiding it, and a great framework to do this is known as <em>Bayesian Statistics</em>.</p><h3><strong>Bayesian Statistics</strong></h3><p>Bayesianism is rooted in the idea that probability is a measure of uncertainty and, as such, it is dependent on the information available to the individual making the measurement. As a measure, it can be applied to anything you can think of, including unique events, unknown quantities, or the truth about a statement.</p><p>The term refers to <a href="https://en.wikipedia.org/wiki/Thomas_Bayes">Thomas Bayes</a>, an 18th-century reverend who proved a special case of the theorem that bears his name. This theorem provides a way to compute the “inverse probability”, that is, the probability of an event <em>A</em> given an event <em>B</em> when we know the probability of <em>B</em> given <em>A.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uMmG4OdWE5Vi5p3UAkOeFw.jpeg" /><figcaption>Bayes Theorem in a neon sign</figcaption></figure><p>For Bayesians, it is a way to make inference about parameters, given the model of the data and the <em>prior</em> <em>distribution</em> of the parameter. This <em>prior distribution </em>encodes the information possessed before any data is observed.</p><p>Through the use of this theorem and its definition of probability, Bayesian Statistics can combine information possessed about a phenomenon with observed data about it, and produce updated, more accurate information. And though the inference made in this way is subjective, the theory of Bayesian Statistics states that, as we collect more and more data, the subjective part (the prior information) becomes less and less relevant; the subjective approximates the objective.</p><p>Like in frequentism, simple Bayesian models have a straightforward interpretation, for example, the posterior distributions of linear coefficients measure the uncertainty<br>around the effect of an independent variable in the dependent.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1010/1*mzLsydLJWkaViQFhLUQLvQ.png" /><figcaption>Posterior distributions for a Bayesian linear regression. The peak of the distribution represents the most likely value for the parameter, while the spread represents the uncertainty about it.</figcaption></figure><p>But unlike frequentists, bayesians can assign a probability to a hypothesis, and compute it directly using Bayes theorem. In this way, we can determine, with a strong basis in theory, the likelihood of a hypothesis given data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1019/1*SPonBJjOpS2OwtGgWSdT4g.png" /><figcaption>Bayes Theorem applied to hypothesis evaluation. (Credit: <a href="https://www.fastforwardlabs.com/research/FF05">Fast Forward Labs</a>)</figcaption></figure><p>And, unlike supervised learning methods, statistics provide the full distribution of the response variable given the features, allowing us to ask any number of questions related to it. This conditional distribution also encodes the uncertainty about our predictions, allowing us, for example, to compute prediction intervals as opposed to single values for each input combination.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/761/1*Q1fRSTy1ZxIT_jFKPl-Bfw.png" /><figcaption>The predictive distribution of y given variables x and data D. The shadowed area represents the probability that y is between 0 and 2.5</figcaption></figure><h3><strong>Some Limitations</strong></h3><p>Of course, there is a reason mainstream science uses frequentist methods instead of bayesian ones, and it comes down to practicality; for the past centuries, the applicability of Bayesianism was limited by the hard, sometimes impossible, integrals that must be solved or approximated to make it work. One is needed to compute the “posterior” distribution, that is, the measure of uncertainty after observing data, and another for the predictive distribution, which will tell us what is the likely value of a “new” data point, possibly given some other variables.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/946/1*TZlP4T7QWbzAw64qd3ipog.png" /><figcaption>The predictive distribution. This integral is often impossible to solve analytically</figcaption></figure><p>Fortunately, recent developments in <a href="https://en.wikipedia.org/wiki/Markov_chain_Monte_Carlo">Monte Carlo Markov Chains</a>, have arisen as a way to simulate from these distributions without the need to explicitly compute the integrals. By simulating many observations from the posterior or predictive distributions, we can compute any probability that can be derived from them.</p><p>Even more advanced methods, such as <a href="https://arxiv.org/pdf/1603.00788.pdf">Automatic Differentiation Variational Inference</a> (ADVI) further reduce the time and tuning needed to arrive at the posterior distributions.</p><p>There are further philosophical questions and practical considerations that have prevented the mainstream use of these methods, although the latter have been somewhat lessened by recent developments in <em>probabilistic programming.</em></p><h3><strong>Probabilistic Programming</strong></h3><p>Probabilistic programming is the name given to frameworks capable of fully specifying a Bayesian model and make inference with only a couple of lines.</p><p>The following snippets are taken from an example of a mean change detection model, taken from the excellent book by Cameron Davidson-Pilon, <a href="https://github.com/CamDavidsonPilon/Probabilistic-Programming-and-Bayesian-Methods-for-Hackers">Bayesian Methods for Hackers</a>, where you can find it in full.</p><p>Here is the model specification in <a href="http://docs.pymc.io/notebooks/getting_started.html">PyMC3</a>.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/58a863b66d978b9ce333706e0bff6fc1/href">https://medium.com/media/58a863b66d978b9ce333706e0bff6fc1/href</a></iframe><p>Making inference (i.e. solving those ugly integrals) can also be done in just a couple of lines:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c102875c20f03dc117f0b028cf6a8c8a/href">https://medium.com/media/c102875c20f03dc117f0b028cf6a8c8a/href</a></iframe><p>While PyMC3 is a great framework, there are many others if Python is not your cup of tea, such as <a href="http://www.robots.ox.ac.uk/~fwood/anglican/">Anglican</a> for Clojure or the standalone <a href="http://mc-stan.org/">Stan</a>.</p><h3><strong>Love Uncertainty</strong></h3><p>In conclusion, <strong>Bayesian Statistics</strong> provide a framework for data analysis which can overcome many limitations prevalent in different techniques such as Supervised Learning and Frequentist Statistics.</p><p>In particular, they provide a way to deal with the problem of <strong>overcertainty</strong>, allowing us to ask questions about probability, and enabling the analyst to have a healthier relationship with uncertainty, by measuring and presenting it instead of blindly reducing it.</p><h3><strong>Further Reading</strong></h3><ul><li><a href="https://github.com/CamDavidsonPilon/Probabilistic-Programming-and-Bayesian-Methods-for-Hackers"><em>Bayesian Methods for Hackers</em></a><em>, </em>by Cameron Davidson-Pilon.</li><li><a href="https://www.fastforwardlabs.com/research/FF05"><em>Probabilistic Programming</em></a>, a report by Fast Forward Labs.</li><li><a href="http://web4.cs.ucl.ac.uk/staff/D.Barber/textbook/090310.pdf"><em>Bayesian Reasoning and Machine Learning</em></a>, by David Barber.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fd13c23442b6" width="1" height="1" alt=""><hr><p><a href="https://medium.com/datank-ai-blog/how-i-learned-to-stop-worrying-and-love-uncertainty-fd13c23442b6">How I Learned to Stop Worrying and Love Uncertainty</a> was originally published in <a href="https://medium.com/datank-ai-blog">Datank.ai Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>