-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updates to Dimension Reduction documentation
- Loading branch information
Showing
9 changed files
with
140 additions
and
74 deletions.
There are no files selected for viewing
26 changes: 18 additions & 8 deletions
26
docs/source/dimension_reduction/grassmann/grassmann_interpolation.rst
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,33 @@ | ||
Interpolation | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
:py:mod:`UQpy` offers the capability to interpolate points on the Grassmann :math:`\mathcal{G}(p,n)`. Consider we have a set of | ||
:math:`n+1` points :math:`(t_0, \mathbf{X}_0), ..., (t_n, \mathbf{X}_n)`, with :math:`t_0 <...<t_n` and | ||
:py:mod:`UQpy` offers the capability to interpolate points on the Grassmann :math:`\mathcal{G}(p,n)`. Consider we have a | ||
set of :math:`n+1` points :math:`(t_0, \mathbf{X}_0), ..., (t_n, \mathbf{X}_n)`, with :math:`t_0 <...<t_n` and | ||
:math:`\mathbf{X}_k \in \mathbb{R}^{p \times n}`, and we want to find | ||
a function :math:`p(x)` for which :math:`p(t_k)=\mathbf{X}_k` for :math:`k=0,..,n`. In this setting, | ||
a function :math:`p(x)` for which :math:`p(t_k)=\mathbf{X}_k` for :math:`k=0,..,n` where | ||
:math:`x` is a continuous independent variable and :math:`t_k` are called the nodes (or coordinates) of the interpolant. | ||
However, since the Grassmann manifold has a nonlinear structure, interpolation can only be performed on the tangent space | ||
which is a flat space. To this end, the steps required to interpolate a point on :math:`\mathcal{G}(p,n)` the are the | ||
following: | ||
However, since the Grassmann manifold has a nonlinear structure, interpolation can only be performed on the tangent | ||
space, which is a flat inner-product space. Therefore the following steps are required to interpolate on | ||
:math:`\mathcal{G}(p,n)`: | ||
|
||
1. Calculate the Karcher mean of the given points on the manifold. | ||
2. Project all points onto the tangent space with origin the Karcher mean. | ||
2. Project all points onto the tangent space with origin at the Karcher mean. | ||
3. Perform the interpolation on the tangent space using the available methods. | ||
4. Map the interpolated point back onto the manifold. | ||
|
||
The :class:`.GrassmannInterpolation` class provides a framework to perform these steps. To use this | ||
class we need to import it first | ||
class we need to import it as follows: | ||
|
||
>>> from UQpy.dimension_reduction.grassmann_manifold.GrassmannInterpolation import GrassmannInterpolation | ||
|
||
We must then instantiate a :class:`.GrassmannInterpolation` object and then invoke the :py:meth:`.interpolate_manifold` | ||
method as: | ||
|
||
>>> X = GrassmannInterpolation() | ||
>>> Y = X.interpolate_manifold(point) | ||
|
||
|
||
Methods | ||
~~~~~~~~~~~~~~~~~~~ | ||
|
||
.. autoclass:: UQpy.dimension_reduction.GrassmannInterpolation | ||
:members: |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
Grassmann Point | ||
----------------------------------- | ||
|
||
The :py:mod:`UQpy` class :class:`.GrassmannPoint` offers a way to check whether a data point, given as a matrix | ||
:math:`\mathbf{X} \in \mathbb{R}^{n \times p}`, belongs on the corresponding Grassmann manifold. The class takes, as | ||
input, an orthonormal 2d :class:`.numpy.ndarray` i.e., :math:`\text{shape}(\mathbf{X})=(p, n)`, and checks if this matrix | ||
is an orthonormal basis that lies with :math:`\mathbf{X}' \mathbf{X} = \mathbf{I}` on the Grassmann manifold. If it is, | ||
then it creates the corresponding :class:`.GrassmannPoint` object. | ||
|
||
To use the :class:`.GrassmannPoint` class one needs to first import it by | ||
|
||
>>> from UQpy.utilities.GrassmannPoint import GrassmannPoint | ||
|
||
To create an object of type :class:`.GrassmannPoint` | ||
|
||
>>> X = GrassmannPoint(X) | ||
|
||
.. autoclass:: UQpy.utilities.GrassmannPoint |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,13 @@ | ||
Utilities | ||
================ | ||
|
||
The :py:mod:`.Utilities` module contains a set of classes that support operations in :py:mod:`UQpy` that | ||
may be useful across several modules. These utilities include the following: | ||
|
||
.. toctree:: | ||
:maxdepth: 1 | ||
:caption: Auxiliary functionalities | ||
|
||
Distances <distances/index> | ||
Kernels <kernels/index> | ||
GrassmannPoint <grassmann_point.rst> | ||
|
||
Grassmann Point | ||
^^^^^^^^^^^^^^^ | ||
|
||
The :py:mod:`UQpy` class :class:`.GrassmannPoint` offers a way to check that a data point, given as a matrix :math:`\mathbf{X} \in \mathbb{R}^{n \times p}`, belongs on the corresponding Grassmann manifold. To this end, the user needs to create an object of type :class:`.GrassmannPoint` | ||
that will check that the point is given as an orthonormal 2-d numpy.array, i.e., :math:`\text{shape}(\mathbf{X})=(p, n)` and :math:`\mathbf{X}' \mathbf{X} = \mathbf{I}`. | ||
In order to use the class :class:`.GrassmannPoint` one needs to import it | ||
|
||
>>> from UQpy.utilities.GrassmannPoint import GrassmannPoint | ||
|
||
To create an object of type :class:`.GrassmannPoint` | ||
|
||
>>> X = GrassmannPoint(X) | ||
|
||
.. autoclass:: UQpy.utilities.GrassmannPoint |
This file contains 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
Oops, something went wrong.