News for hackers. Stuff that matters.
Re:How a Kalman filter works, in pictures (2015) by amelius on Saturday January 21, 2017 @10:01AM (#13450281)
Pardon my ignorance, I'm just wondering about some context, since the Kalman filter was invented in the 60s. Are Kalman filters still highly relevant, or are they (in practice and/or in theory) obsoleted by other techniques, such as general ML?
Re:How a Kalman filter works, in pictures (2015) by platz on Saturday January 21, 2017 @12:53PM (#13451163)
-- Kalman Filters vs HMM (Hidden Markov Model):

"In both models, there's an unobserved state that changes over time according to relatively simple rules, and you get indirect information about that state every so often. In Kalman filters, you assume the unobserved state is Gaussian-ish and it moves continuously according to linear-ish dynamics (depending on which flavor of Kalman filter is being used). In HMMs, you assume the hidden state is one of a few classes, and the movement among these states uses a discrete Markov chain. In my experience, the algorithms are often pretty different for these two cases, but the underlying idea is very similar." - THISISDAVE

-- HMM vs LSTM/RNN:

"Some state-of-the-art industrial speech recognition [0] is transitioning from HMM-DNN systems to "CTC" (connectionist temporal classification), i.e., basically LSTMs. Kaldi is working on "nnet3" which moves to CTC, as well. Speech was one of the places where HMMs were _huge_, so that's kind of a big deal." -PRACCU

"HMMs are only a small subset of generative models that offers quite little expressiveness in exchange for efficient learning and inference." - NEXTOS

"IMO, anything that be done with an HMM can now be done with an RNN. The only advantage that an HMM might have is that training it might be faster using cheaper computational resources. But if you have the $$$ to get yourself a GPU or two, this computational advantage disappears for HMMs." - SHERJILOZAIR

Re:How a Kalman filter works, in pictures (2015) by rawnlq on Saturday January 21, 2017 @11:09AM (#13450641)
Kalman filters are never going to completely go away since they are optimal[1] under certain assumptions. But these assumptions are often not met so you have to start approximating (with EKF or UKF).

In those scenarios, once computational power allows, I think other approaches such as particle filters which can handle arbitrary distributions(e.g., multimodal) will start taking over. But we're not there yet(?).

[1]https://en.wikipedia.org/wiki/Kalman_filter#Optimality_and_p...

Re:How a Kalman filter works, in pictures (2015) by kurthr on Saturday January 21, 2017 @06:31PM (#13452712)
I agree both EKF and UKF are what you'll find in real world applications (because computing Jacobians is a pain!). I find the work of Jeffery Uhlmann both incredibly useful and hilarious (in that the "Unscented Kalman Filter" came from a stick of deodorant on a co-workers desk).

http://ethw.org/First-Hand:The_Unscented_Transform

Re:How a Kalman filter works, in pictures (2015) by tnecniv on Saturday January 21, 2017 @10:55AM (#13450567)
Yes, they are a staple of modern robotics and other fields. If the Kalman filter assumptions about the system hold (linear model, Gaussian noise), the Kalman filter is an optimal filter and you can't do better. There are also more complicated variants like the extended Kalman filter and the unscented Kalman that can do better when the assumptions of the Kalman filter are not accurate.

It's also worth noting that the Kalman filter follows the EM pattern of many ML / statistical models.

Re:How a Kalman filter works, in pictures (2015) by sudoscript on Saturday January 21, 2017 @11:08AM (#13450633)
In practical robotics, how often do the assumptions hold? Is it really usually true that the variables have only a linear relationship?
Re:How a Kalman filter works, in pictures (2015) by tnecniv on Saturday January 21, 2017 @11:37AM (#13450775)
People are generally happy with the Gaussian noise assumption. In some cases, there are acceptable linearizations of the dynamical model. One example is linearizing the quadrotor dynamics about the hover state (no roll or pitch). This approximation works well enough for basic flying, but you won't be able to pull off any flashy maneuvers because any hard bank will move you too far away from the linearization point for it to hold. A better choice would be a more complicated KF (I've used an error-state KF in the past).

The real draw of these filters, though, is that they are very fast. In my experience, most of the compute time every update cycle is spent on sensing because your sensors dump a ton of data that you need to process as part of your CV / SLAM / whatever pipeline (the outputs of these then go into your KF). The dream is to get a 10ms update loop so your control algorithms can do a good job, but this is easier said than done.

Re:How a Kalman filter works, in pictures (2015) by terragon on Saturday January 21, 2017 @11:29AM (#13450737)
No, but nonlinear systems can be linearized about any particular operating point very easily, and the linearized system is often reasonably close to the whole nonlinear one.
Re:How a Kalman filter works, in pictures (2015) by thw19289 on Saturday January 21, 2017 @09:58PM (#13453356)
KF has absolutely nothing to do with EM; no latent variables, no Jensen, no surrogate... nada.

Please stop saying that.

Re:How a Kalman filter works, in pictures (2015) by visarga on Sunday January 22, 2017 @09:49AM (#13455358)
Can a KF be implemented in or explained as a RNN?
Re:How a Kalman filter works, in pictures (2015) by thw19289 on Sunday January 22, 2017 @10:19AM (#13455474)
No.
Re:How a Kalman filter works, in pictures (2015) by ajross on Saturday January 21, 2017 @10:10AM (#13450331)
They're not really applicable to the same problem areas. Kalman filters are most often applied in small/embedded system control environments where latency matters more, control is continuous, and you don't have a cloud to host your autopilot.
Re:How a Kalman filter works, in pictures (2015) by deepitee1 on Saturday January 21, 2017 @06:06PM (#13452608)
>Kalman filters are most often applied in small/embedded system control environments where latency matters more

For example, missile guidance.

Re:How a Kalman filter works, in pictures (2015) by mabbo on Saturday January 21, 2017 @10:23AM (#13450407)
Beyond what the other replies are saying, the general pattern is also highly applicable. You can keep O(1) memory, update it on every new piece of unreliable data, and continually have a better understanding of what the truth is.

Consider standard deviation. You can calculate the standard deviation of a stream of numbers without storing all of them, or knowing where the stream will end. 'The standard deviation so far', in effect.

Re:How a Kalman filter works, in pictures (2015) by kurthr on Saturday January 21, 2017 @06:43PM (#13452755)
Exactly, the UKF and EKF filters are very highly optimized for memory size and computation while dealing with noisy measurements non-linear and difficult to compute functions. They certainly don't require normally distributed errors.

That makes them applicable to a wide range of embedded applications. As generalized ML tools, I'm pretty doubtful unless you wanted to create something in hardware as a large set of coupled noisy state-spaces.

http://ethw.org/First-Hand:The_Unscented_Transform

Re:How a Kalman filter works, in pictures (2015) by amelius on Saturday January 21, 2017 @11:08AM (#13450635)
> Consider standard deviation. You can calculate the standard deviation of a stream of numbers without storing all of them, or knowing where the stream will end. 'The standard deviation so far', in effect.

Yes, you are right, but this is both a good example, and a bad example, because my old Casio calculator could do that too :)

Re:How a Kalman filter works, in pictures (2015) by samfisher83 on Saturday January 21, 2017 @10:10AM (#13450335)
Yes they are used for radar and sonar stuff. We use them in our products.
Re:How a Kalman filter works, in pictures (2015) by panic on Saturday January 21, 2017 @10:45AM (#13450522)
They're used in brain-machine interfaces: http://cs.brown.edu/~black/Papers/nips02Final.pdf
Re:How a Kalman filter works, in pictures (2015) by emcq on Saturday January 21, 2017 @12:37PM (#13451104)
Yes it is used. But there is a whole wealth of more general additional techniques based on probabilistic graphical models. A good reference for those curious is probabilistic robotics: http://robots.stanford.edu/probabilistic-robotics/
Re:How a Kalman filter works, in pictures (2015) by msvan on Saturday January 21, 2017 @10:14AM (#13450358)
I saw Kalman filters being used in comma.ai's self-driving car code.