This class represents a sample of connectomes, with various properties and methods to handle their tangent and vectorized images.
Active bindings
connectomes
Connectomes data
tangent_images
Tangent images data
vector_images
Vector images data
sample_size
Sample size
matrix_size
Matrix size
mfd_dim
Manifold dimension
is_centered
Centering status
frechet_mean
Frechet mean
riem_metric
Riemannian Metric used
variation
Variation of the sample
sample_cov
Sample covariance
ref_point
Reference point for tangent or vectorized images
distances
Squared distances to the Frechet mean
Methods
Method new()
Initialize a CSample object
Usage
CSample$new(
conns = NULL,
tan_imgs = NULL,
vec_imgs = NULL,
centered = NULL,
ref_pt = NULL,
metric_obj
)
Arguments
conns
A list of connectomes (default is NULL).
tan_imgs
A list of tangent images (default is NULL).
vec_imgs
A matrix whose rows are vectorized images (default is NULL).
centered
Boolean indicating whether tangent or vectorized images are centered (default is NULL).
ref_pt
A connectome (default is identity)
metric_obj
Object of class
rmetric
representing the Riemannian metric used.
Method compute_tangents()
This function computes the tangent images from the connectomes.
Usage
CSample$compute_tangents(ref_pt = default_ref_pt(private$p))
Method compute_fmean()
This function computes the Frechet mean of the sample.
Method center()
Center the sample
Method compute_variation()
Compute Variation
Details
This function computes the variation of the sample. It first checks if the vector images are null, and if so, it computes the vectors, computing first the tangent images if necessary. If the sample is not centered, it centers the sample and recomputes the vectors. Finally, it calculates the variation as the mean of the sum of squares of the vector images. Error if vec_imgs
is not specified.
Method compute_dists()
Compute distances
Details
This function computes the distances of the elements of the sample to the Frechet mean. It first checks if the vector images are null, and if so, it computes the vectors, computing first the tangent images if necessary. If the sample is not centered, it centers the sample and recomputes the vectors. Finally, it calculates the distances as the Euclidean norms of the vector images. Error if vec_imgs
is not specified.
Method compute_sample_cov()
Compute Sample Covariance