This class represents a sample of connectomes, with various properties and methods to handle their tangent and vectorized images.
Active bindings
connectomesConnectomes data
tangent_imagesTangent images data
vector_imagesVector images data
sample_sizeSample size
matrix_sizeMatrix size
mfd_dimManifold dimension
is_centeredCentering status
frechet_meanFrechet mean
riem_metricRiemannian Metric used
variationVariation of the sample
sample_covSample covariance
ref_pointReference point for tangent or vectorized images
distancesSquared 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
connsA list of connectomes (default is NULL).
tan_imgsA list of tangent images (default is NULL).
vec_imgsA matrix whose rows are vectorized images (default is NULL).
centeredBoolean indicating whether tangent or vectorized images are centered (default is NULL).
ref_ptA connectome (default is identity)
metric_objObject of class
rmetricrepresenting 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