Fisher manifolds#53
Open
Nimrais wants to merge 29 commits into
Open
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #53 +/- ##
==========================================
- Coverage 89.20% 88.39% -0.81%
==========================================
Files 21 26 +5
Lines 250 543 +293
==========================================
+ Hits 223 480 +257
- Misses 27 63 +36 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fisher Information Metric for Exponential Family Manifolds
The PR introduces a specialized manifold wrapper
WithMetricequipped withNaturalMetric. This construction represents an exponential family manifold where the Riemannian metric is defined by the Fisher Information Matrix (FIM) in natural coordinates.Key Features
The primary goal of this feature is to ensure geometric consistency between the metric and the exponential map. In a properly defined Riemannian manifold, the geodesic curves generated by
exp!must be consistent with the metric defined byinner.We implement exact geodesics and transport operations for specific distributions to guarantee this consistency, which is verified via
ManifoldsBase.check_geodesic.1. Fisher Information Metric
The
NaturalMetrictype integrates the Fisher information matrix as a Riemannian metric.2. Exact Geodesics
For supported manifolds, we override the default
ManifoldsBasebehavior to provide exact solutions for:exp!,exp_fused!): Analytical solutions to the geodesic equation.log!): The inverse of the exponential map.Supported Distributions
Currently, exact geometric support is implemented for the following distributions:
Bernoulli
src/metric_manifolds/bernoulli.jlNormal
src/metric_manifolds/normal.jluses the isomorphism to the Poincaré half-plane and hyperboloid model to compute geodesics and transport.Usage Example
To use the Fisher metric manifold, use the
get_fisher_manifoldhelper:Implementation Details
The implementation relies on the
WithMetricwrapper which:exp,log,parallel_transport,inner,norm) to the underlying natural parameter manifold.Bernoulli,NormalMeanVariance).For other distributions, you can still use
WithMetricbut you may need to provide your own retractions or metric definitions if exact geodesics are not yet implemented.