<?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 Prathyusha Mallela on Medium]]></title>
        <description><![CDATA[Stories by Prathyusha Mallela on Medium]]></description>
        <link>https://medium.com/@prathyusha-mallela?source=rss-a7b12b8dc7d6------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*GcnxzNWfloJ6a8NcrJI6mw@2x.jpeg</url>
            <title>Stories by Prathyusha Mallela on Medium</title>
            <link>https://medium.com/@prathyusha-mallela?source=rss-a7b12b8dc7d6------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 21:03:54 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@prathyusha-mallela/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[Approximate Inference Algorithm: Particle Filtering Algorithm]]></title>
            <link>https://medium.com/@prathyusha-mallela/approximate-inference-algorithm-particle-filtering-f79ceb60b2fa?source=rss-a7b12b8dc7d6------2</link>
            <guid isPermaLink="false">https://medium.com/p/f79ceb60b2fa</guid>
            <category><![CDATA[particle-filter-algorithm]]></category>
            <category><![CDATA[particle-filter]]></category>
            <category><![CDATA[approximate-inference]]></category>
            <dc:creator><![CDATA[Prathyusha Mallela]]></dc:creator>
            <pubDate>Fri, 07 Feb 2025 08:45:18 GMT</pubDate>
            <atom:updated>2025-02-07T16:15:20.554Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Important terms and definitions:</strong></p><p><strong>What is Bayesian Inference?</strong> It is a way of making of making statistical inference on prior statistical data by applying Bayes’ Theorem as and when new information becomes available. Which implies it is a dynamic inferencing technique.</p><p><strong>What’s Bayes’ Theorem?</strong> Posterior Probability: P(Hypothesis | Evidence); Likelihood: P(Evidence | Hypothesis); Prior: P(Hypothesis); P(Evidence): Marginal Likelihood</p><blockquote>P(Hypothesis | Evidence) = P(Evidence | Hypothesis) . P(Hypothesis)/ P(Evidence)</blockquote><p><strong>What is MC approximation?</strong> It is a numerical method used when the posterior distributions in a Bayesian filtering problem for a nonlinear system cannot be computed exactly due to intractability (distributions can be multi-modal and some of the state components might be discrete, and Gaussian approximations cannot be used). In simple terms, when transforming a Gaussian distribution into a Monte Carlo (MC) representation, the continuous values are replaced with <strong>N</strong> sampled points.</p><p><strong>Why MC for approximation?</strong> The convergence is guaranteed by Law of Large Numbers, Central Limit Theorem and the error term is O(N⁻¹/²) irrespective of how huge the continuous variable that’s being sampled is.</p><p>There’s different kinds of sampling that’s used by MC and they are importance and sequential sampling and for the purpose of explaining the particle filtering algorithm I’m going to skip it and explain it in another article. But, the summary is importance sampling is a variance reduction technique of MC, where an efficient distribution is selected for reweighting of samples by using a likelihood ratio. SIS, here samples are generated iteratively and influence the future samples. SIS is important to know as it is used in Markov Chain MC and Particle filtering algorithm that we are going to discuss.</p><p>Let’s discuss the essentials of particle filtering algorithm and the steps it must take. Keep in mind that the algorithm is application dependent and from my experience the domain knowledge of the application one wants to use it on plays a significant role in the kind of sampling algorithm one wants to use. It took me many iterations of understanding this algorithm to implement it in a way that worked for the applications I was working with.</p><blockquote>Note: Sequential Importance Sampling + Resampling = Particle Filtering Algorithm</blockquote><p>The essential steps:</p><p>Assume that the application you’re working with provides you with prior probability distribution and an N — the number of samples you’d need to use to work with.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/826/1*claRgISrerHInsULhmMRwA.png" /></figure><p>Only store the current state xₖ⁽ⁱ⁾as it is convenient to choose the importance distribution to be Markovian. Specifically, a first-order Markovian assumption is preferable over an n -order Markovian model.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/974/1*ZutOyFoxP2LnpbGgnccvTQ.png" /></figure><p>The idea of resampling is to replace the weighted sample set from SIS algorithm with the newly indexed sample set. Which also effectively reset the weights as 1/N that is, the resampling becomes unbaised. This process will effectively remove the particles with very small weights and duplicate the particles with very large weights. The resampling essentially introduces additional variance to the estimates. This variance can be reduced by identifying and utilizing appropriate resampling methodologies. Some of these methods could be Inverse Transform Sampling for resampling, Multinomial resampling, Systematic resampling. It’s important to remember that the quality of the importance distribution impacts the performance of the Particle Filtering Algorithm. There are different techniques or local linearization to put it mathematically that can be used to form importance distributions. The local linearization techniques that can be used would be extended Kalman Filter, unscented Kalman Filter or other types of non-linear Kalman Filtering Algorithms.</p><p><strong>Where can PFA be used?</strong> Some of the areas it has been used in and is not limited to are in Robot Localization,Object Tracking,Financial Modeling,Autonomous Driving,Speech Recognition, Epidemic Tracking etc.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f79ceb60b2fa" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[d-separation in Causal Inference]]></title>
            <link>https://medium.com/@prathyusha-mallela/d-separation-in-causal-inference-d3beb22f016e?source=rss-a7b12b8dc7d6------2</link>
            <guid isPermaLink="false">https://medium.com/p/d3beb22f016e</guid>
            <category><![CDATA[causal-inference]]></category>
            <category><![CDATA[causality]]></category>
            <category><![CDATA[causal-ai]]></category>
            <dc:creator><![CDATA[Prathyusha Mallela]]></dc:creator>
            <pubDate>Sat, 26 Oct 2024 07:26:02 GMT</pubDate>
            <atom:updated>2024-10-26T07:42:02.681Z</atom:updated>
            <content:encoded><![CDATA[<p>In this article, I explain the concept of <em>d-separation</em>. To grasp d-separation, it’s essential to understand its role within causal graphs. Appreciating the significance of <em>d-separation</em> requires a foundational understanding of what causal graphs are and how they represent relationships.</p><p>What is a causal graph, and why is it significant? A causal graph is a directed acyclic graph (DAG) that represents cause-and-effect relationships within a real-world system. These graphs are powerful tools for visualizing and analyzing how variables influence one another, providing clarity about the causal structure underlying complex problems.</p><p>But what is causality? As defined by <em>Pearl &amp; Mackenzie (2019)</em>, “<em>A causes B if B listens to A.</em>” For example, in the sequence Difficulty → Marks → Grade, each arrow signifies a direct causal influence from one variable to the next.</p><p>Consider what happens if we intervene on the node <em>Marks</em> — for instance, if the professor adjusts grading based on their perception of the course’s difficulty. Here, <em>Grade</em> depends directly on <em>Marks</em>, as <em>Grade</em> “listens” to <em>Marks</em>. With this intervention, <em>Difficulty</em> no longer influences <em>Grade</em> since <em>Marks</em> is being controlled. This change can be represented by a modified causal graph: <em>Marks → Grade</em>. Removing nodes to reflect interventions helps us understand causal impacts, offering insights into abstract real-world problems. Using the rules of <em>d-separation </em>one needn’t remove the nodes that become obsolete after intervention. <em>d-separation </em>is a set of rules that show if the graph is connected following a specific set of interventions.</p><p>How does <em>d-separation</em> aid in causal inference? In causal inference, we aim to estimate the causal effect of one set of variables on another within a causal graph, which is often constructed using causal discovery, expert knowledge, or a combination of both. Causal discovery is a process wherein observational and interventional data is used to create a visual structure for analysis. Whereas expert knowledge simply assumes that the expert in the field draws out the cause-and-effect relationship of the environment for further analysis. For analysis, one of the tools that come in handy is the <em>d-separation. d-separation</em> is a key tool for identifying conditional independencies within the graph, allowing us to determine which variables are causally relevant and which can be disregarded. By understanding these dependencies, d-separation helps isolate the true causal relationships, improving the accuracy of causal effect estimation.</p><p>To understand this better, let’s examine the different types of structures that a causal graph can have. In any causal graph, there are three fundamental substructures:</p><ol><li><strong>Chain</strong>: X→Y→Z</li><li><strong>Fork</strong>: X←Y→Z</li><li><strong>Collider</strong>: X→Y←Z</li></ol><p>Each of these structures represents a unique pattern of causal relationships in the graph.</p><p>When would you say a set of nodes are <em>d-separated</em> from other set of nodes in a causal graph G? This happens when all paths between the two sets of nodes are blocked. How are they blocked?</p><p>In the causal graph G: X → B ← Y → Z → A → T ← U ← R</p><p>X is independent of {Y,Z,A} since B is a collider. {Y, Z, A} is independent of {U,R} since T is a collider. Anytime a collider is present between two nodes, the path is blocked.</p><p>Intuitively, let’s say we have: Skill → Grade ← Difficulty. When Grade isn’t conditioned, Skill and Difficulty are independent of eachother. If we condition on Grade, that is if we know Grade, we can infer how skilled the student is because of the difficulty of the test.</p><p>The above graph G also establishes that B is dependent on {Z,A} if Y isn’t conditioned or known. The path is open. T is dependent on R and vice-versa if U isn’t conditioned.</p><p>Intuitively, let’s say we have a chain network: Hardwork → Knowledge → Grade. Grade is dependent on Knowledge and Knowledge is dependent on Hardwork. Hardwork and Grade are <em>d-connected</em> (as opposed to <em>d-separated</em>). When Knowledge is conditioned, that is if the student is given questions to study for the exam prior to the exam, the student is expected to get good high Grade. Also, if the student is asked to appear for a geography exam but is tested on physics, the hardworking student may not perform well impacting the Grade attribute.</p><p>Let’s now speak about a fork structure: Grade ← Quality Of Education → Motivation. Grade is <em>d-connected</em> to Motivation. But if Quality Of Education is conditioned or controlled, that is if Quality Of Education is held high, even if the grades are high, the students’ Motivation may be varying. Therefore conditioning on Quality Of Education would <em>d-separate</em> Grade and Motivation, hence making them independent of eachother.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d3beb22f016e" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>