Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New manifold kernel eval bug #286

Open
dehann opened this issue Apr 30, 2024 · 2 comments
Open

New manifold kernel eval bug #286

dehann opened this issue Apr 30, 2024 · 2 comments
Labels
bug Something isn't working
Milestone

Comments

@dehann
Copy link
Member

dehann commented Apr 30, 2024

@dehann dehann added this to the v0.8.5 milestone Apr 30, 2024
@dehann dehann added the bug Something isn't working label Apr 30, 2024
@dehann
Copy link
Member Author

dehann commented Apr 30, 2024

Consolidated Malahanobis Usage

Working towards consolidation with Malahanobis operations in IIF parametric:
https://github.com/JuliaRobotics/IncrementalInference.jl/blob/d470e902f1d774904ce383f7003e690fce6b81af/src/parametric/services/ParametricUtils.jl#L364-L374

as well as consolidation with RKHS work here:

ret = ker(MF, a[i], b[j], bw)

ker eval is:

ker(M::AbstractManifold, p, q, sigma::Real=0.001, distFnc=(_M,_p,_q)->distance(_M,_p,_q)^2) = exp( -sigma*distFnc(M, p, q) ) # _distance(M,p,q) #

Current code

and also have efficient code, the current (unrolled) compute steps for evaluate in code are:

dim = manifold_dimension(M)
nscl = 1/sqrt((2*pi)^dim * det(cov(ekr)))
return nscl * ker(M, ekr, p, 0.5, distanceMalahanobisSq)

which uses Malahanobis definition:

δc = distanceMalahanobisCoordinates(M,K,q,basis)
p = mean(K)
ϵ = identity_element(M, q)
X = get_vector(M, ϵ, δc, basis)
return inner(M, p, X, X)

which does the coordinate conversion via:

p = mean(K)
i_p = inv(M,p)
pq = Manifolds.compose(M, i_p, q)
ϵ = identity_element(M,q)
X = log(M, ϵ, pq)
Xc = get_coordinates(M, ϵ, X, basis)
return K.sqrt_iΣ*Xc

Would like

I would like to keep the unrolled structure and suggest we confirm that each of the unrolled steps in computing a MvNormal density are coming out right.

@dehann
Copy link
Member Author

dehann commented May 1, 2024

Should be in "local" coordinates,

pq = Manifolds.compose(M, i_p, q)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant