-
Notifications
You must be signed in to change notification settings - Fork 1
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
MLJ Tangent space transformer #5
base: master
Are you sure you want to change the base?
Conversation
Codecov Report
@@ Coverage Diff @@
## master #5 +/- ##
============================================
- Coverage 100.00% 23.07% -76.93%
============================================
Files 3 4 +1
Lines 21 91 +70
============================================
Hits 21 21
- Misses 0 70 +70
Continue to review full report at Codecov.
|
@ablaom could you take a look at this PR? This should be a reasonable first step for manifold support in MLJ. In particular Does it go in a more or less right direction? |
Cool. Exciting to see convergence of differential geometry with MLJ! I've had a quick look at this PR and I think understand the basic objective here.
|
Yes, right, it would certainly make sense to centralize that functionality. That looks like a lot of work though and the current approach also works so I'd prefer to leave the multivariate functionality here for now and refactor it later.
I think we have two issues here. First, I actually thought that it might make more sense to split the current functionality of
Right, |
Okay, I misunderstood. I thought your "tangent space" was a custom object. Rather, you identify elements of a tangent space with points in (a subspace of some) Euclidean space and you don't care to remember the base point or what subspace this is? And you are then splitting the components of this representation into columns of a table? And, just to be clear, the input of your Transformer can be either:
Correct? Assuming the answer to these questions is yes, it would make sense to have specific input and output side types for a separate "univariate" transformer, well the generic transformer would have rather loose types like |
Well, not quite. In Manifolds.jl there are no strict requirements for the representation of tangent vectors. Usually, an isometric embedding into the Euclidean space is used to represent points and a similar representation is used for tangent vectors (with a notable exception of low-rank matrices). We also have another representation for tangent vectors, that is their coefficients in a certain basis (in this transformer it's stored here: https://github.com/JuliaManifolds/ManifoldML.jl/pull/5/files#diff-dd238691731421f4d569f6b8d8496c5a1eecfd8203b6a3e98fcb077218659909R30). Also, I wasn't quite sure here what to do with storing the point at which the vectors are tangent so currently it's stored in From a more high-level point of view, this transformer is supposed to be useful as a part of for example principal geodesic analysis. In general, when a standard statistical method is generalized to manifolds, one can either use the minimization-based formulation and rewrite it using geometric concepts (which is the path that, with few exceptions, requires Manopt.jl) or take a more approximate route of selecting a decent linearization of data and applying standard methods to coefficients in a basis (which is what this tangent space transformer is useful for).
Essentially, yes. That's how I can for example use the standard PCA code to do principal geodesic analysis.
Yes, OK, I think I know now how to improve this. |
A small update: I'm planning to generalize it to chart transformers (with tangent space transformer as a special case) after JuliaManifolds/Manifolds.jl#325 is finished. After that I'll see if there are any updates to MLJ that would let me implement it a bit nicer. |
Cool, sorry that I did not have time to come back to ManifoldML. |
At the moment it's just an initial sketch. I'm going to use it to try out the new MLJ <-> Manifolds integration: https://github.com/alan-turing-institute/MLJScientificTypes.jl/issues/46 .