probml / pml2-book

Probabilistic Machine Learning: Advanced Topics
MIT License
1.37k stars 118 forks source link

Incorrect unscented transform hyperparameters in Section 8.4.1 #309

Closed jacobhilton closed 1 month ago

jacobhilton commented 5 months ago

The suggested hyperparameters for the unscented transform appear to contradict the cited source. The text currently reads:

"A typical recommended setting for these is α = 10^(−3), κ = 1, β = 2 [Bit16]."

Based on my reading of the cited source, which I found here, my suggestion would be to replace this with:

"A typical recommended setting for these is α = 1, β = 0, κ ≈ n/2 [Bit16]."

Full explanation below.

Thank you!


Quoting from the cited source:

"Given these results I strongly discourage the use of small α, as typically suggested in descriptions of the UKF (as, e.g., in Wan and van der Merwe (2001), or on Wikipedia) and suggest to stick with the base or mean sets in which α is implicitly set to 1 (see overview figure over sigma point sets at the end of the theory section)."

In the overview figure, the base and mean sets have α = 1, β = 0, and hence w_0^c = w_0^m = w_0.

On the choice of w_0, the source says:

"Overall, I saw that the previously suggested value of w_0=1/3 appears to be a good compromise when suitable, problem-specific values of w_0 are unknown. Perhaps a slightly lower value of w_0=0.2 may be good, but it will really depend on the problem at hand. The base set with w_0=0 actually may also be a reasonable choice in many situations. It has the additional, small advantage that it uses one sigma point less than the mean set."

Since κ = n/((1/w_0)-1), the suggestions w_0 = 1/3 and w_0 = 0.2 correspond to κ = n/2 and κ = n/4 respectively.

Another nice thing about taking α = 1, β = 0 is that it matches what you mention elsewhere in the book, in Sections 8.4.2 and 8.5.1.4.

murphyk commented 1 month ago

You are right, thanks. (And you seem to match https://en.wikipedia.org/wiki/Kalman_filter#Unscented_Kalman_filter, after changing notation.)