Project Subject SPD Representations to a Common Tangent Space
Source:R/riemannian_methods_hatsa.R
get_tangent_space_coords.Rd
Computes the Fréchet mean of specified SPD representations for a group of subjects and then projects each subject's SPD matrix to the tangent space anchored at this mean. This allows for applying standard Euclidean multivariate analyses to these Riemannian data.
Usage
get_tangent_space_coords(object, ...)
# S3 method for class 'hatsa_projector'
get_tangent_space_coords(
object,
type = "cov_coeffs",
tangent_metric = c("logeuclidean", "airm"),
subject_data_list = NULL,
k_conn_params = NULL,
spd_regularize_epsilon = 1e-06,
mean_options = list(),
verbose = FALSE,
...
)
Arguments
- object
A `hatsa_projector` or `task_hatsa_projector` object.
- ...
Additional arguments passed to `get_spd_representations` or `frechet_mean_spd`.
- type
Character string indicating the type of SPD representation to use (e.g., `"cov_coeffs"`). Passed to `get_spd_representations`.
- tangent_metric
Character string, `"logeuclidean"` (default) or `"airm"`, specifying which metric's log map to use for projection. This also influences the metric for Fréchet mean computation if not overridden by `mean_options`.
- subject_data_list
Optional. Passed to `get_spd_representations`.
- k_conn_params
Optional. Passed to `get_spd_representations`.
- spd_regularize_epsilon
Epsilon for regularizing SPD matrices.
- mean_options
A list of options for `frechet_mean_spd` (e.g., `max_iter`, `tol`). The `metric` argument within this list will override `tangent_metric` for the mean computation step if provided.
- verbose
Logical, controls verbosity.
Value
A list containing: - `tangent_vectors`: A list of symmetric matrices (tangent vectors), one per valid subject. Names correspond to subject original indices. - `mean_spd_matrix`: The Fréchet mean SPD matrix used as the tangent point. - `metric_used`: The metric used for the log map (`"logeuclidean"` or `"airm"`). - `num_valid_subjects`: Number of subjects for whom tangent vectors were computed. - `original_num_subjects`: Total number of subjects in the input object.