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

Fix log product formula for NCH #336

Merged
merged 3 commits into from
Dec 21, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyriemann_qiskit/utils/distance.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def weights_logeuclid_to_convex_hull(A, B, optimizer=ClassicalOptimizer()):
matrices = range(n_matrices)

def log_prod(m1, m2):
gcattan marked this conversation as resolved.
Show resolved Hide resolved
return np.nansum(logm(m1).flatten() * logm(m2).flatten())
return np.trace(logm(m1) @ logm(m2))

prob = Model()
optimizer = get_global_optimizer(optimizer)
Expand Down
Loading