Title: | Operations for Riemannian Manifolds |
---|---|
Description: | Implements operations for Riemannian manifolds, e.g., geodesic distance, Riemannian metric, exponential and logarithm maps, etc. Also incorporates random object generator on the manifolds. See Dai, Lin, and Müller (2021) <doi:10.1111/biom.13385>. |
Authors: | Xiongtao Dai [aut, cre, cph], Zhenhua Lin [aut] |
Maintainer: | Xiongtao Dai <[email protected]> |
License: | GPL (>= 2) |
Version: | 0.1.1 |
Built: | 2024-11-25 06:45:35 UTC |
Source: | CRAN |
Returns the angle representation of SO(3) matrices c.f. https://en.wikipedia.org/wiki/Axis-angle_representation
axisAngleRep(mfd, X)
axisAngleRep(mfd, X)
mfd |
A manifold object created by |
X |
A matrix holding a vectorized SO(3) matrix in each column |
A matrix with 4 rows and the same number of columns as X. The first row contains the angles in rads (theta), and the last three rows correspond to the the axes with respect to which the rotations are performed.
Parametrize the tangent space at location p, so that the parameterized version contains an open neighborhood around the origin. (The dimension of v is potentially reduced).
## S3 method for class 'Euclidean' basisTan(mfd, p) basisTan(mfd, p) ## S3 method for class 'SO' basisTan(mfd, p) ## S3 method for class 'SPD' basisTan(mfd, p) ## S3 method for class 'Sphere' basisTan(mfd, p) ## S3 method for class 'FlatTorus' basisTan(mfd, p)
## S3 method for class 'Euclidean' basisTan(mfd, p) basisTan(mfd, p) ## S3 method for class 'SO' basisTan(mfd, p) ## S3 method for class 'SPD' basisTan(mfd, p) ## S3 method for class 'Sphere' basisTan(mfd, p) ## S3 method for class 'FlatTorus' basisTan(mfd, p)
mfd |
A manifold object created by |
p |
A vector for a base point on the manifold |
An orthonormal basis matrix D, whose columns contain the basis vectors, so that 'D^T v' give the coordinates 'v0' for a tangent vector 'v', and 'D
basisTan(Euclidean)
: An identity matrix
basisTan(SO)
: An identity matrix
basisTan(SPD)
: The basis is obtained from enumerating the (non-strict) lower-triangle of a square matrix. If i != j, the (i, j)th entry is mapped into a matrix with 1/sqrt(2) in the (i,j) and (j,i) entries and 0 in other entries; if (i == j), it is mapped to a matrix with 1 in the ith diagonal element and 0 otherwise. The mapped matrix is then vectorized to obtain the basis vector.
basisTan(Sphere)
: The basis at the north pole is [0, ..., 1, ..., 0] where the 1 is at the j = 2, ..., dAmbth location. The basis at a point p is obtained through rotating the basis from the north pole to p along the shortest geodesic.
basisTan(FlatTorus)
: An identity matrix
Transform the coordinates w.r.t. a basis returned by [basisTan()] to tangent vectors
coordToTanV(mfd, p, V0, ...) ## Default S3 method: coordToTanV(mfd, p, V0, ...)
coordToTanV(mfd, p, V0, ...) ## Default S3 method: coordToTanV(mfd, p, V0, ...)
mfd |
A manifold object created by |
p |
A vector for the base point |
V0 |
A matrix or a vector containing the coordinates |
... |
Passed into specific methods |
A matrix in which each column correspond to a different tangent vector
coordToTanV(default)
: Method
Create an object to symbolize the manifold. Supports the Euclidean, the unit sphere, special orthogonal group, and symmetric positive definite (SPD) matrices with either the affine invariant or the log-Euclidean metric.
createM(mfdName)
createM(mfdName)
mfdName |
One of 'Euclidean', 'Sphere', 'SO', 'AffInv', or 'LogEu'. The name is case sensitive. |
Overall, most of the arguments in the manifold functions respect recycling rules. If the input arguments are matrices with n rows corresponding to n points, then the manifold function will be applied to each of the n pairs; the returned value will be a matrix. If one input corresponds to n points and the other just one point, then the one point will be recycled. If each component corresponds to one point, the returned value will correspond to just one point.
A structure 1 with class being 'mfdName'
'calcGeomPar' calculates geometric parameter. 'calcIntDim' calculates the intrinsic dimensions. 'calcAmbDim' calculates the ambient dimensions. 'calcTanDim' calculates the number of tuples used to represent a tangent vector.
calcGeomPar(mfd, dimAmbient, dimIntrinsic, dimTangent) calcIntDim(mfd, geomPar, dimAmbient, dimTangent) calcAmbDim(mfd, geomPar, dimIntrinsic, dimTangent) calcTanDim(mfd, geomPar, dimAmbient, dimIntrinsic)
calcGeomPar(mfd, dimAmbient, dimIntrinsic, dimTangent) calcIntDim(mfd, geomPar, dimAmbient, dimTangent) calcAmbDim(mfd, geomPar, dimIntrinsic, dimTangent) calcTanDim(mfd, geomPar, dimAmbient, dimIntrinsic)
mfd |
A manifold object created by |
dimAmbient |
Dimension of the ambient space. |
dimIntrinsic |
Intrinsic dimension of the manifold. |
dimTangent |
The length of a tangent vector |
geomPar |
The geometric parameter (e.g., SO(*)) |
A scalar value for the geometric parameter
A scalar value for the intrinsic dimension
A scalar value for the ambient dimension
A scalar value for the number of components in the (implementation of the) tangent vector
Geodesic distance
## S3 method for class 'Euclidean' distance(mfd, X, Y, ...) distance(mfd, X, Y, ...) ## S3 method for class 'L2' distance(mfd, X, Y, ...) ## S3 method for class 'HS' distance(mfd, X, Y, ...) ## S3 method for class 'Dens' distance(mfd, X, Y, ...) ## S3 method for class 'SO' distance(mfd, X, Y, ...) ## S3 method for class 'LogEu' distance(mfd, X, Y, assumeLogRep = FALSE, ...) ## S3 method for class 'AffInv' distance(mfd, X, Y, ...) ## S3 method for class 'Sphere' distance(mfd, X, Y, ...)
## S3 method for class 'Euclidean' distance(mfd, X, Y, ...) distance(mfd, X, Y, ...) ## S3 method for class 'L2' distance(mfd, X, Y, ...) ## S3 method for class 'HS' distance(mfd, X, Y, ...) ## S3 method for class 'Dens' distance(mfd, X, Y, ...) ## S3 method for class 'SO' distance(mfd, X, Y, ...) ## S3 method for class 'LogEu' distance(mfd, X, Y, assumeLogRep = FALSE, ...) ## S3 method for class 'AffInv' distance(mfd, X, Y, ...) ## S3 method for class 'Sphere' distance(mfd, X, Y, ...)
mfd |
A manifold object created by |
X , Y
|
Matrices with n columns. The distance between each pair of columns is calculated. If either X or Y is a vector then it is recycled. |
... |
Passed into specific methods |
assumeLogRep |
Whether to assume the input are already the representations under the logarithm map |
A vector with n entries containing the distances between pairs of points
distance(Euclidean)
: Method
distance(L2)
: Method
distance(HS)
: Method
distance(Dens)
: Method
distance(SO)
: Method
distance(LogEu)
: Method
distance(AffInv)
: Method
distance(Sphere)
: Method
ExpM(X)
computes the matrix exponential using Armardillo.
ExpM(X)
ExpM(X)
X |
A square matrix |
A matrix having the same size as the input
Calculate the Fréchet mean
frechetMean(mfd, X, ...) ## Default S3 method: frechetMean( mfd, X, mu0, weight = NULL, tol = 1e-09, maxit = 1000, lam = 0.99, ... )
frechetMean(mfd, X, ...) ## Default S3 method: frechetMean( mfd, X, mu0, weight = NULL, tol = 1e-09, maxit = 1000, lam = 0.99, ... )
mfd |
A manifold object created by |
X |
A matrix with each column being a point on the manifold. |
... |
Passed into specific methods |
mu0 |
A matrix of starting points. Each column corresponds to a starting point. If there are multiple columns, then a multistart algorithm is used. |
weight |
A vector of weights for the observations |
tol |
The threshold for determining convergence |
maxit |
Maximum iteration |
lam |
The step length |
A matrix with 1 column containing the Fréchet mean
frechetMean(default)
: Default method
Calculate the Fréchet median
frechetMedian(mfd, X, ...) ## Default S3 method: frechetMedian( mfd, X, mu0, weight = NULL, tol = 1e-09, maxit = 1000, alpha = 1, ... )
frechetMedian(mfd, X, ...) ## Default S3 method: frechetMedian( mfd, X, mu0, weight = NULL, tol = 1e-09, maxit = 1000, alpha = 1, ... )
mfd |
A manifold object created by |
X |
A matrix with each column being a point on the manifold. |
... |
Passed into specific methods |
mu0 |
A matrix of starting points. Each column corresponds to a starting point. If there are multiple columns, then a multistart algorithm is used. |
weight |
A vector of weights for the observations |
tol |
The threshold for determining convergence |
maxit |
Maximum iteration |
alpha |
The step size parameter. See Fletcher et al. (2008) CVPR |
A matrix with 1 column containing the Fréchet median
frechetMedian(default)
: Default method
Obtain the geodesic curve
geodesicCurve(mfd, p, h, t) ## S3 method for class 'HS' geodesicCurve(mfd, p, h, t) ## S3 method for class 'Sphere' geodesicCurve(mfd, p, h, t)
geodesicCurve(mfd, p, h, t) ## S3 method for class 'HS' geodesicCurve(mfd, p, h, t) ## S3 method for class 'Sphere' geodesicCurve(mfd, p, h, t)
mfd |
A class instance that represents the Riemannian manifold |
p |
The starting point of the geodesic curve |
h |
A matrix with each column representing a tangent vector. If there is only one tangent vector is supplied, then it is replicated to match the length of t |
t |
A vector, the time points where the curve is evaluated. |
The curve is
A matrix of points lying on a geodesic. Different columns correspond to different time points
A matrix with each column representing a point on the manifold
geodesicCurve(HS)
: Method
geodesicCurve(Sphere)
: Geodesic curve stating at a point
Get the name of the settings from a named list good for saving into a data frame or use as file name
GetSettingName(settings, digits = 3, display = c("short", "pretty", "tiny"))
GetSettingName(settings, digits = 3, display = c("short", "pretty", "tiny"))
settings |
A named list. The names corresponding to the setting parameter names, and the values are the parameter values |
digits |
How many digits to use to format the numerical values |
display |
Which version of the setting name to produce |
A character vector of setting names
Tell whether a manifold is a finite-dimensional one
is.finiteDim(mfd)
is.finiteDim(mfd)
mfd |
A manifold object created by |
A logical scalar indicating whether the manifold is finite-dimensional
List all available manifold names
listAvailMfd()
listAvailMfd()
A character vector of the names of available manifolds
LogM(X)
computes the matrix logarithm of a general matrix using Armardillo. The returned value is a complex matrix but converted into a real one.
LogM(X)
LogM(X)
X |
A square matrix |
A matrix having the same size as the input
LogMSPD(X)
computes the matrix logarithm of an SPD matrix using Armardillo. The returned value is a real matrix.
LogMSPD(X)
LogMSPD(X)
X |
An SPD matrix |
A symmetric matrix
Make a symmetric matrix by specifying a near-symmetric matrix M, or the lower triangular elements lowerTri with diagonal.
MakeSym(M, lowerTri, doubleDiag = FALSE)
MakeSym(M, lowerTri, doubleDiag = FALSE)
M |
A near-symmetric matrix |
lowerTri |
A vector containing the lower triangular elements of the matrix. This is an alternative way to specify the matrix. |
doubleDiag |
Only meaningful for lowerTri is not missing. Whether the diagonal elements should be multiplied by sqrt(2) for doubling the squared norm of the lower triangle |
A symmetric matrix
Implements operations for Riemannian manifolds, e.g., geodesic distance, Riemannian metric, exponential and logarithm maps, etc. Also incorporates random object generator on the manifolds
References: Dai X, Lin Z, Müller HG. Modeling sparse longitudinal data on Riemannian manifolds. Biometrics. 2021;77(4):1328–41. Dai X, Lopez-Pintado S. Tukey’s depth for object data. Journal of the American Statistical Association. 2021;In press.
Maintainer: Xiongtao Dai [email protected]
Xiongtao Dai [email protected] Zhenhua Lin
Returns the Riemannian metric
## S3 method for class 'Euclidean' metric(mfd, p, U, V) metric(mfd, p, U, V) ## Default S3 method: metric(mfd, p = NULL, U, V) ## S3 method for class 'HS' metric(mfd, p, U, V) ## S3 method for class 'Dens' metric(mfd, p, U, V) ## S3 method for class 'SO' metric(mfd, p, U, V) ## S3 method for class 'LogEu' metric(mfd, p, U, V) ## S3 method for class 'AffInv' metric(mfd, p, U, V) ## S3 method for class 'Sphere' metric(mfd, p, U, V)
## S3 method for class 'Euclidean' metric(mfd, p, U, V) metric(mfd, p, U, V) ## Default S3 method: metric(mfd, p = NULL, U, V) ## S3 method for class 'HS' metric(mfd, p, U, V) ## S3 method for class 'Dens' metric(mfd, p, U, V) ## S3 method for class 'SO' metric(mfd, p, U, V) ## S3 method for class 'LogEu' metric(mfd, p, U, V) ## S3 method for class 'AffInv' metric(mfd, p, U, V) ## S3 method for class 'Sphere' metric(mfd, p, U, V)
mfd |
A manifold object created by |
p |
A vector containing the (single) base point on the manifold. |
U , V
|
Matrices with n columns each containing a tangent vector. The metric of each pair of n columns is calculated. |
A vector with n entries containing the metric values
metric(Euclidean)
: Method
metric(default)
: Method
metric(HS)
: Method
metric(Dens)
: Method
metric(SO)
: Method
metric(LogEu)
: Method
metric(AffInv)
: Method
metric(Sphere)
: Method
Norm on the tangent space induced by the Riemannian metric
## S3 method for class 'Euclidean' norm(mfd, p, U) norm(mfd, p, U) ## Default S3 method: norm(mfd, p = NULL, U) ## S3 method for class 'L2' norm(mfd, p, U) ## S3 method for class 'HS' norm(mfd, p, U) ## S3 method for class 'Dens' norm(mfd, p, U) ## S3 method for class 'SO' norm(mfd, p, U) ## S3 method for class 'LogEu' norm(mfd, p, U) ## S3 method for class 'AffInv' norm(mfd, p, U) ## S3 method for class 'Sphere' norm(mfd, p, U)
## S3 method for class 'Euclidean' norm(mfd, p, U) norm(mfd, p, U) ## Default S3 method: norm(mfd, p = NULL, U) ## S3 method for class 'L2' norm(mfd, p, U) ## S3 method for class 'HS' norm(mfd, p, U) ## S3 method for class 'Dens' norm(mfd, p, U) ## S3 method for class 'SO' norm(mfd, p, U) ## S3 method for class 'LogEu' norm(mfd, p, U) ## S3 method for class 'AffInv' norm(mfd, p, U) ## S3 method for class 'Sphere' norm(mfd, p, U)
mfd |
A manifold object created by |
p , U
|
Matrices with n columns. p stands for the base point(s) and U the tangent vector(s). The norm of each column in U is calculated w.r.t. the corresponding column in p. |
A vector with n entries containing the norms of the tangent vectors
norm(Euclidean)
: Method
norm(default)
: Method
norm(L2)
: Method
norm(HS)
: Method
norm(Dens)
: Method
norm(SO)
: Method
norm(LogEu)
: Method
norm(AffInv)
: Method
norm(Sphere)
: Method
Normalize a vector
Normalize(v, tol = 1e-10)
Normalize(v, tol = 1e-10)
v |
A vector to be normalized to have a unit norm |
tol |
The tolerance value for deciding the v is actually 0, cannot be normalized, and thus return just the 0 vector |
A vector with the same length as 'v' but having unit Euclidean norm
Each manifold defined in this package has been designated a more or less reasonable choice of origin.
## S3 method for class 'Euclidean' origin(mfd, dimIntrinsic, ...) origin(mfd, dimIntrinsic, ...) ## S3 method for class 'L2' origin(mfd, dimIntrinsic, ...) ## S3 method for class 'HS' origin(mfd, dimIntrinsic, ...) ## S3 method for class 'Dens' origin(mfd, dimIntrinsic, ...) ## S3 method for class 'SO' origin(mfd, dimIntrinsic, ...) ## S3 method for class 'SPD' origin(mfd, dimIntrinsic, ...) ## S3 method for class 'Sphere' origin(mfd, dimIntrinsic, ...)
## S3 method for class 'Euclidean' origin(mfd, dimIntrinsic, ...) origin(mfd, dimIntrinsic, ...) ## S3 method for class 'L2' origin(mfd, dimIntrinsic, ...) ## S3 method for class 'HS' origin(mfd, dimIntrinsic, ...) ## S3 method for class 'Dens' origin(mfd, dimIntrinsic, ...) ## S3 method for class 'SO' origin(mfd, dimIntrinsic, ...) ## S3 method for class 'SPD' origin(mfd, dimIntrinsic, ...) ## S3 method for class 'Sphere' origin(mfd, dimIntrinsic, ...)
mfd |
A manifold object created by |
dimIntrinsic |
An integer for the intrinsic dimension |
... |
Passed into specific methods |
A matrix with 1 column, a designation of the origin on the manifold
origin(Euclidean)
: Method
origin(L2)
: Method
origin(HS)
: Method
origin(Dens)
: The uniform density
origin(SO)
: The origin has 1 in the first ambient coordinate and 0 otherwise.
origin(SPD)
: The origin is the identity matrix but vectorized.
origin(Sphere)
: The origin has 1 in the first ambient coordinate and 0 otherwise.
Project data points in the ambient space onto the manifold
## S3 method for class 'Euclidean' project(mfd, p) project(mfd, p) ## S3 method for class 'L2' project(mfd, p) ## S3 method for class 'HS' project(mfd, p) ## S3 method for class 'Dens' project(mfd, p) ## S3 method for class 'SO' project(mfd, p) ## S3 method for class 'AffInv' project(mfd, p) ## S3 method for class 'LogEu' project(mfd, p) ## S3 method for class 'SPD' project(mfd, p) ## S3 method for class 'Sphere' project(mfd, p)
## S3 method for class 'Euclidean' project(mfd, p) project(mfd, p) ## S3 method for class 'L2' project(mfd, p) ## S3 method for class 'HS' project(mfd, p) ## S3 method for class 'Dens' project(mfd, p) ## S3 method for class 'SO' project(mfd, p) ## S3 method for class 'AffInv' project(mfd, p) ## S3 method for class 'LogEu' project(mfd, p) ## S3 method for class 'SPD' project(mfd, p) ## S3 method for class 'Sphere' project(mfd, p)
mfd |
A manifold object created by |
p |
A matrix of points to be projected to the manifold. |
A matrix in which columns correspond to points on the manifold
project(Euclidean)
: Method
project(L2)
: Method
project(HS)
: Method
project(Dens)
: Method
project(SO)
: Method
project(AffInv)
: Method
project(LogEu)
: Method
project(SPD)
: Method
project(Sphere)
: Method
Project data points in the ambient space onto the tangent space
## S3 method for class 'Euclidean' projectTangent(mfd, p, X, projMatOnly = FALSE, ...) projectTangent(mfd, p, X, projMatOnly, ...) ## S3 method for class 'L2' projectTangent(mfd, p, X, projMatOnly = FALSE, ...) ## S3 method for class 'HS' projectTangent(mfd, p, X, projMatOnly = FALSE, ...) ## S3 method for class 'Dens' projectTangent(mfd, p, X, projMatOnly, ...) ## S3 method for class 'SO' projectTangent(mfd, p, X, projMatOnly = FALSE, ...) ## S3 method for class 'SPD' projectTangent(mfd, p, X, projMatOnly = FALSE, ...) ## S3 method for class 'Sphere' projectTangent(mfd, p, X, projMatOnly = FALSE, ...)
## S3 method for class 'Euclidean' projectTangent(mfd, p, X, projMatOnly = FALSE, ...) projectTangent(mfd, p, X, projMatOnly, ...) ## S3 method for class 'L2' projectTangent(mfd, p, X, projMatOnly = FALSE, ...) ## S3 method for class 'HS' projectTangent(mfd, p, X, projMatOnly = FALSE, ...) ## S3 method for class 'Dens' projectTangent(mfd, p, X, projMatOnly, ...) ## S3 method for class 'SO' projectTangent(mfd, p, X, projMatOnly = FALSE, ...) ## S3 method for class 'SPD' projectTangent(mfd, p, X, projMatOnly = FALSE, ...) ## S3 method for class 'Sphere' projectTangent(mfd, p, X, projMatOnly = FALSE, ...)
mfd |
A manifold object created by |
p |
A vector containing the base point on the manifold. Data X will be projected onto the tangent space of p. |
X |
A vector or a matrix containing the data points in terms of the coordinates in the ambient space. |
projMatOnly |
Whether to only return the projection matrix (FALSE) or the projected data points (TRUE, the default) |
... |
Passed into specific methods |
A matrix in which columns correspond to points on the tangent spaces
projectTangent(Euclidean)
: Method
projectTangent(L2)
: Method
projectTangent(HS)
: Method
projectTangent(Dens)
: Method
projectTangent(SO)
: Method
projectTangent(SPD)
: Method
projectTangent(Sphere)
: Method
Riemannian exponential map
## S3 method for class 'Euclidean' rieExp(mfd, p, V, ...) rieExp(mfd, p, V, ...) ## S3 method for class 'L2' rieExp(mfd, p, V, ...) ## S3 method for class 'HS' rieExp(mfd, p, V, ...) ## S3 method for class 'Dens' rieExp(mfd, p, V, ...) ## S3 method for class 'SO' rieExp(mfd, p, V, tol = 1e-10, ...) ## S3 method for class 'LogEu' rieExp(mfd, p, V, ...) ## S3 method for class 'AffInv' rieExp(mfd, p, V, ...) ## S3 method for class 'Sphere' rieExp(mfd, p, V, ...)
## S3 method for class 'Euclidean' rieExp(mfd, p, V, ...) rieExp(mfd, p, V, ...) ## S3 method for class 'L2' rieExp(mfd, p, V, ...) ## S3 method for class 'HS' rieExp(mfd, p, V, ...) ## S3 method for class 'Dens' rieExp(mfd, p, V, ...) ## S3 method for class 'SO' rieExp(mfd, p, V, tol = 1e-10, ...) ## S3 method for class 'LogEu' rieExp(mfd, p, V, ...) ## S3 method for class 'AffInv' rieExp(mfd, p, V, ...) ## S3 method for class 'Sphere' rieExp(mfd, p, V, ...)
mfd |
A manifold object created by |
p , V
|
Matrices with n columns. The exponential map of each column in V is calculated w.r.t. the corresponding column in p. |
... |
Passed into specific methods |
tol |
Tolerance for 'rieExp.SO' |
A matrix in which columns correspond to points on the manifold
rieExp(Euclidean)
: Method
rieExp(L2)
: Method
rieExp(HS)
: Method
rieExp(Dens)
: Method
rieExp(SO)
: Method
rieExp(LogEu)
: Method
rieExp(AffInv)
: Method
rieExp(Sphere)
: Method
Riemannian logarithm map
## S3 method for class 'Euclidean' rieLog(mfd, p, X, ...) rieLog(mfd, p, X, ...) ## S3 method for class 'L2' rieLog(mfd, p, X, ...) ## S3 method for class 'HS' rieLog(mfd, p, X, tol = 1e-07, ...) ## S3 method for class 'Dens' rieLog(mfd, p, X, ...) ## S3 method for class 'SO' rieLog(mfd, p, X, tol = 1e-10, ...) ## S3 method for class 'LogEu' rieLog(mfd, p, X, ...) ## S3 method for class 'AffInv' rieLog(mfd, p, X, ...) ## S3 method for class 'Sphere' rieLog(mfd, p, X, tol = 1e-10, ...)
## S3 method for class 'Euclidean' rieLog(mfd, p, X, ...) rieLog(mfd, p, X, ...) ## S3 method for class 'L2' rieLog(mfd, p, X, ...) ## S3 method for class 'HS' rieLog(mfd, p, X, tol = 1e-07, ...) ## S3 method for class 'Dens' rieLog(mfd, p, X, ...) ## S3 method for class 'SO' rieLog(mfd, p, X, tol = 1e-10, ...) ## S3 method for class 'LogEu' rieLog(mfd, p, X, ...) ## S3 method for class 'AffInv' rieLog(mfd, p, X, ...) ## S3 method for class 'Sphere' rieLog(mfd, p, X, tol = 1e-10, ...)
mfd |
A manifold object created by |
p , X
|
Matrices with n columns. The logarithm map of each column in X is calculated w.r.t. the corresponding column in p. |
... |
Passed into specific methods |
tol |
Tolerance for 'rieLog.SO' |
A matrix in which columns correspond to points on the tangent spaces
rieLog(Euclidean)
: Method
rieLog(L2)
: Method
rieLog(HS)
: Method
rieLog(Dens)
: Method
rieLog(SO)
: Method
rieLog(LogEu)
: Method
rieLog(AffInv)
: Method
rieLog(Sphere)
: Method
By default, random variables are generated by mapping isotropic Gaussian distributions on the tangent space back to the manifold using the exponential map
rmfd(mfd, n, dimIntrinsic, ...) ## Default S3 method: rmfd( mfd, n, dimIntrinsic, p, dist = c("norm", "unif", "exp"), totalVar = 1, ... )
rmfd(mfd, n, dimIntrinsic, ...) ## Default S3 method: rmfd( mfd, n, dimIntrinsic, p, dist = c("norm", "unif", "exp"), totalVar = 1, ... )
mfd |
A manifold object created by |
n |
Sample size |
dimIntrinsic |
The intrinsic dimension of the target manifold |
... |
Passed into specific methods |
p |
Optionally, specify the base point of the tangent space, on which random tangent vectors will be generated. Default to the origin of 'mfd'. |
dist |
Either a string or a function, describing the distributions. If it is character, then independent univariate r.v. following that distribution with total variance 1 is generated on the tangent space. If it is a function, it should specify the generation of the samples on the tangent space _coordinates_ (with dimension dimIntrinsic), and it must return a matrix for which the columns are the coordinates. Then it will be mapped to the tangent space at the origin and then to the manifold. |
totalVar |
Total variance (sum of diagonal of the covariance matrix) of the tangent random vector |
A matrix with n columns, each containing a random sample on the manifold
rmfd(default)
: Default method
Generate uniform random variables on the unit sphere
runifSphere(n, dimAmbient)
runifSphere(n, dimAmbient)
n |
Sample size |
dimAmbient |
The dimension of the ambient space |
A 'dimAmbient' by 'n' matrix. Each column is a random observation
Transform the tangent vectors to coordinates w.r.t. the basis returned by [basisTan()]
tanVToCoord(mfd, p, V, ...) ## Default S3 method: tanVToCoord(mfd, p, V, ...)
tanVToCoord(mfd, p, V, ...) ## Default S3 method: tanVToCoord(mfd, p, V, ...)
mfd |
A manifold object created by |
p |
A vector for the base point |
V |
A matrix or a vector containing the tangent vectors |
... |
Passed into specific methods |
A matrix in which each column correspond to a coordinate
tanVToCoord(default)
: Method