Fix problem in selection of the principal directions in Tangent PCA. #1878
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.
This PR is related to PR #1513 in which a solution is proposed.
The current Tangent PCA algorithm does not necessarily select the axis which corresponds to the largest variance.
The problem is that the current Tangent PCA does not take into account the metric at the mean to sort the principal directions.
To show this problem, I have created an almost Euclidean manifold (e488adb).
This manifold is the Euclidean space of dimension 2 whose metric has been modified to give more weight to the second axis. It's infinitesimal metric element is defined by:
ds^2 = dx1^2 + 10000 dx2^2
Then if we run the following codes (e488adb):
The tangent PCA returns
axis_2
as the principal axis since it is the axis whichcorresponds to the larger variance. It is returning
axis_1
instead.To solve this problem, we can multiply the
log
vectors at themean
by square root of themetric_matrix
to select the correct principal directions (see PR #1513).