Live data from Hacker News

Derive Yourself a Kalman Filter

ngr.yt

11–20 of 56 posts

Re: Derive Yourself a Kalman Filter

#11
In my very ignorant world view Kalman filters make some prediction from some input. As do various ML techniques. As do various statistical models and techniques. What are some good sources that show the connection between all these techniques and help me pick the right one for specific use cases?

For example, I want to predict a time series let's say the number of visitors of a site. I know some characteristics of the series (periodic, seasonal), but how should I go about it?

Re: Derive Yourself a Kalman Filter

#12
post #10
post #9

I think there is no such thing as a conditional random variable. There are conditional probability distributions, but I've never heard of A|B itself being a random variable and I think it doesn't fit the definition. A random variable (I'm not a mathematician) is a function that takes an elementary event and returns the value of the variable. You may say this is pedantry, but I think it's important to keep track of wh…

http://www.maths.qmul.ac.uk/~pettit/MTH5122/notes15.pdf

Hm, I googled it now, the issue is discussed in detail here: https://math.stackexchange.com/questions/612468/how-to-forma...

Re: Derive Yourself a Kalman Filter

#13
post #11

In my very ignorant world view Kalman filters make some prediction from some input. As do various ML techniques. As do various statistical models and techniques. What are some good sources that show the connection between all these techniques and help me pick the right one for specific use cases? For example, I want to predict a time series let's say the number of visitors of a site. I know some characteristics of th…

> In my very ignorant world view Kalman filters make some prediction from some input.

This doesn't seem like an accurate view of what Kalman filters do.

Fundamentally, they just combine noisy measurements over time to produce a more precise estimate of what the measurements should be.

There is a prediction step, but that is based on an existing model of how the state should evolve over time.

Re: Derive Yourself a Kalman Filter

#14

"It's really quite simple. Here, let me show you all these formulas..." This reminds me of last week. I bought a house and want to get into woodworking so I looked up intro videos on YouTube. "It's easy. Just follow me over to this table saw and router and planer and all these other tools you don't own." I know I'm not being fair. But a recurring frustration I have is when experts claim it's easy or simple or for beg…

Thanks for your comment (and thanks to everyone who answered below). I have been way too many times in the same situation where someone says something is "trivial" or "easy" so I completely get your point and will try not to make the same mistake for the next posts.

Regarding your question, I think the answers you have had are on point!

Re: Derive Yourself a Kalman Filter

#15
post #10

Earlier quoted context omitted.

http://www.maths.qmul.ac.uk/~pettit/MTH5122/notes15.pdf

Hm, I googled it now, the issue is discussed in detail here: https://math.stackexchange.com/questions/612468/how-to-forma...

Thanks for your comments! I don't see how what is discussed here conflicts with the notation I introduced into the post, do you still believe there is a soundness issue in what I have written?

Re: Derive Yourself a Kalman Filter

#16
post #11

In my very ignorant world view Kalman filters make some prediction from some input. As do various ML techniques. As do various statistical models and techniques. What are some good sources that show the connection between all these techniques and help me pick the right one for specific use cases? For example, I want to predict a time series let's say the number of visitors of a site. I know some characteristics of th…

Most statistical time series models (e.g. ARIMA) models can be obtained using Kalman filters, if you fit them automatically, rather than choose the p-d-q values by hand. That’s how the auto.arima function in R works.

https://stats.stackexchange.com/questions/316676/arima-vs-ka...

Re: Derive Yourself a Kalman Filter

#17
post #4

"It's really quite simple. Here, let me show you all these formulas..." This reminds me of last week. I bought a house and want to get into woodworking so I looked up intro videos on YouTube. "It's easy. Just follow me over to this table saw and router and planer and all these other tools you don't own." I know I'm not being fair. But a recurring frustration I have is when experts claim it's easy or simple or for beg…

You could, kind of. Basically, Kalman filter is this: you have 2 noisy data sources with a known real-life connection (like, vehicle position and velocity), so instead of an accurate measurement for each you have 2 "wide" gaussians. When you multiply them, you still get a gaussian, but a much narrower one, meaning: you still don't know the exact position for sure, but (kind of surprisingly) now you know it with a muc…

Hi,

Trying to simplify even further: you don't need 2 sources, just one, for which the distribution of noise is gaussian. And a model of how the data should evolve over time. Straight-line constant-speed for example, but also, static, turning, accelerating/decelerating... You need to be able to predict the next measurement from the previous one. The Kalman filter then uses the difference between the prediction from the model and the measurement, the incertitude on the measurement, and gives you: a smoothed estimation of the 'real' position of the object, an estimation of the 'noisyness' of your input data (i.e. How much does the data fit the model), and the ability to predict next positions accurately...

Well, not sure this word-soup simplifies anything...

Kalman filters are a bit counter intuitive if you don't have a strong background in probabilities... They clicked for me when 1- shown in comparison with other simpler filters 2- I played with each dimension of the formula on a toy example...

They're also very fun because they can be used in so many ways (sensor data fusion, non gaussian noise models, incredibly complex trajectory models...).

Re: Derive Yourself a Kalman Filter

#18

"It's really quite simple. Here, let me show you all these formulas..." This reminds me of last week. I bought a house and want to get into woodworking so I looked up intro videos on YouTube. "It's easy. Just follow me over to this table saw and router and planer and all these other tools you don't own." I know I'm not being fair. But a recurring frustration I have is when experts claim it's easy or simple or for beg…

I don't know man, the link you clicked on says "Derive Yourself a Kalman Filter", so complaining about a formal treatment seems misguided rather than simply unfair.

Re: Derive Yourself a Kalman Filter

#19

Earlier quoted context omitted.

Hm, I googled it now, the issue is discussed in detail here: https://math.stackexchange.com/questions/612468/how-to-forma...

Thanks for your comments! I don't see how what is discussed here conflicts with the notation I introduced into the post, do you still believe there is a soundness issue in what I have written?

I'm just saying that the notation of say A * X|Y * B seemed unfamiliar to me. I only know conditional notation within a P(...). Or an expectation, etc. Apparently your way of writing is used by others as well, but it may be good to know that it is not fully rigorous.

Again, there are different people preferring different presentations. I as a student was often frustrated by abused notations and was often confused by such things when trying to understand something in detail. For a more cursory and "practical" understanding it could be good enough.

Re: Derive Yourself a Kalman Filter

#20
If you enjoyed this, you might also like this article from my blog:

http://heinrichhartmann.com/blog/2014/12/11/Generative-Model...

This is a study of generating time series/stochastic processes. The estimators for the parameters lead straight up to Kalman filters. The state space models are taken from the Kalman setup. This was the first time I understood how Kalman filters come about. Its really a three step process:

1. Stationary processes --> Classical parameter estimation.

2. Discrete state space --> Markov models

3. Continues state space --> Kalman filters.

Post reply on HN