Learn R Programming

GrFA (version 0.2.2)

TraceRatio: Trace Ratio

Description

Evaluation of the estimated factors by trace ratios. The value is between 0 and 1; higher values indicate better estimation accuracy.

Usage

TraceRatio(G, Ghat)

Value

A numeric value representing the trace ratio, defined as: \(\mathrm{TR} = \mathrm{tr} ( \mathbf{G}' \widehat{\mathbf{G}} (\widehat{\mathbf{G}}'\widehat{\mathbf{G}})^{-1} \widehat{\mathbf{G}}'\mathbf{G})/\mathrm{tr}(\mathbf{G'G})\).

Arguments

G

The true factors matrix.

Ghat

The estimated factors matrix.

Examples

Run this code
G <- matrix(rnorm(100 * 2), 100, 2)
Ghat <- G + matrix(rnorm(100 * 2, sd = 0.1), 100, 2)
TraceRatio(G, Ghat)

Run the code above in your browser using DataLab