<instructions>Your goal is to analyze the following comment and estimate how highly it will be upvoted by the Hacker News community.</instructions><comment><author>tnecniv</author><text>As far as resources, I’m not sure. It really only takes a few lines of code if you have a linear algebra library like NumPy or similar. However you need to write down the math describing your dynamics first.&lt;p&gt;The Kalman filter is really just Bayes Theorem applied to a particular set of system dynamics. Really it’s two applications of Bayes rule: given my current state estimate, how do I update my estimate when I receive a measurement? Then, after receiving that measurement, how will the system dynamics impact my uncertainty before the next measurement? You iterate applying these two every time you receive a measurement.&lt;p&gt;Do you have a dynamics model? I.e., a set of equations that tell you how what ever you are trying to track will update in time? That’s the first thing you need and if you don’t have that, I could see you being quite confused about the implementation.&lt;p&gt;It might help you to either read about particle filters or just Bayes filters generally. The Kalman filter is a Bayes filter for a specific set of assumptions that leads to a lot of linear algebra. If you understand the Bayes filter, the Kalman filter will make more sense, and you can learn about the Bayes filter without all the matrices. The particle filter is another algorithm worth reading about. Like the Kalman filter, it is a Bayes filter but it doesn’t require the linear algebra.&lt;p&gt;Aside: I always get frustrated when I see people saying that you don’t need to know math to be a software developer. Maybe that’s true if you want to make web pages, but the more math you know, the better your ability to model problems and either solve them yourself or find solutions others have created. The scope of problems you can solve via programming becomes so much bigger the more math you know.</text><parent_chain><item><author>chubs</author><text>I&amp;#x27;ve been asked by a friend recently to implement a Kalman filter for a side project. Among many others, I&amp;#x27;ve read this website and still have no idea how to implement it. They all seem to be in the style of &amp;#x27;draw the rest of the owl&amp;#x27;.&lt;p&gt;Can anyone point to anything that explains it in a manner a programmer would explain (eg array iteration instead of sigma notation) ?&lt;p&gt;As far as i understand, Kalman Filters seem to be a moving average of position, velocity, and (perhaps) acceleration, and use those 3 values to estimate the &amp;#x27;real value&amp;#x27; as opposed to what the sensor is telling you.</text></item></parent_chain></comment><story><title>Kalman filter from the ground up</title><url>https://www.kalmanfilter.net/default.aspx</url></story>
<instructions>Your goal is to analyze the following comment and estimate how highly it will be upvoted by the Hacker News community.</instructions><comment><author>dilyevsky</author><text>&amp;gt; As far as i understand, Kalman Filters seem to be a moving average of position, velocity, and (perhaps) acceleration, and use those 3 values to estimate the &amp;#x27;real value&amp;#x27; as opposed to what the sensor is telling you.&lt;p&gt;Sort of. The actual variables (v, r, a in your case) vary depending on your use case. What matters is you make an &lt;i&gt;estimate&lt;/i&gt; based on that state, then you take a &lt;i&gt;measurement&lt;/i&gt; and there’s an iterative way of adjusting your next state based on those two. It’s actually pretty easy to code once you understand formulas.&lt;p&gt;Maybe this could help &lt;a href=&quot;http:&amp;#x2F;&amp;#x2F;bilgin.esme.org&amp;#x2F;BitsAndBytes&amp;#x2F;KalmanFilterforDummies&quot; rel=&quot;nofollow noreferrer&quot;&gt;http:&amp;#x2F;&amp;#x2F;bilgin.esme.org&amp;#x2F;BitsAndBytes&amp;#x2F;KalmanFilterforDummies&lt;/a&gt;</text><parent_chain><item><author>chubs</author><text>I&amp;#x27;ve been asked by a friend recently to implement a Kalman filter for a side project. Among many others, I&amp;#x27;ve read this website and still have no idea how to implement it. They all seem to be in the style of &amp;#x27;draw the rest of the owl&amp;#x27;.&lt;p&gt;Can anyone point to anything that explains it in a manner a programmer would explain (eg array iteration instead of sigma notation) ?&lt;p&gt;As far as i understand, Kalman Filters seem to be a moving average of position, velocity, and (perhaps) acceleration, and use those 3 values to estimate the &amp;#x27;real value&amp;#x27; as opposed to what the sensor is telling you.</text></item></parent_chain></comment><story><title>Kalman filter from the ground up</title><url>https://www.kalmanfilter.net/default.aspx</url></story>