Learn R Programming

SMFilter (version 1.0.3)

FDist2: Compute the squared Frobenius distance between two matrices.

Description

This function Compute the squared Frobenius distance between two matrices.

Usage

FDist2(mX, mY)

Arguments

mX

a \(p \times r\) matrix where \(p \geq r\).

mY

another \(p \times r\) matrix where \(p \geq r\).

Value

the Frobenius distance.

Details

The Frobenius distance between two matrices is defined to be $$d(X, Y) = \sqrt{ \mathrm{tr} \{ A' A \} }$$ where \(A = X - Y\).

The Frobenius distance is a possible measure of the distance between two points on the Stiefel manifold.

Examples

Run this code
# NOT RUN {
FDist2(runif_sm(1,4,2)[1,,], runif_sm(1,4,2)[1,,])

# }

Run the code above in your browser using DataLab