caps {fdacluster} | R Documentation |
Class for clustering with amplitude and phase separation
Description
The k-means algorithm with joint amplitude and phase separation produces a
number of outputs. This class is meant to encapsulate them into a single
object for providing dedicated S3
methods for e.g. plotting, summarizing,
etc. The name of the class stems from Clustering with Amplitude and
Phase Separation.
Usage
as_caps(x)
is_caps(x)
Arguments
x |
A list coercible into an object of class |
Details
An object of class caps
is a list with the following components:
-
original_curves
: A numeric matrix of shapeN \times L \times M
storing a sample with theN
L
-dimensional original curves observed on grids of sizeM
. -
original_grids
: A numeric matrix of sizeN \times M
storing the grids of sizeM
on which original curves are evaluated; -
aligned_grids
: A numeric matrix of sizeN \times M
storing the grids of sizeM
on which original curves must be evaluated to be aligned; -
center_curves
: A numeric matrix of shapeK \times L \times M
storing theK
centers which areL
-dimensional curves observed on a grid of sizeM
; -
center_grids
: A numeric matrix of sizeK \times M
storing the grids of sizeM
on which center curves are evaluated; -
warpings
: A numeric matrix of shapeN \times M
storing the estimated warping functions for each of theN
curves evaluated on the within-cluster commongrids
of sizeM
; -
n_clusters
: An integer value storing the number of clusters; -
memberships
: An integer vector of lengthN
storing the cluster ID which each curve belongs to; -
distances_to_center
: A numeric vector of lengthN
storing the distance of each curve to the center of its cluster; -
silhouettes
: A numeric vector of lengthN
storing the silhouette values of each observation; -
amplitude_variation
: A numeric value storing the fraction of total variation explained by amplitude variability. -
total_variation
: A numeric value storing the amount of total variation. -
n_iterations
: An integer value storing the number of iterations performed until convergence; -
call_name
: A string storing the name of the function that was used to produce the k-means alignment results; -
call_args
: A list containing the exact arguments that were passed to the functioncall_name
that produced this output.
Value
The function as_caps()
returns an object of class caps
. The
function is_caps()
returns a boolean which evaluates to TRUE
is the
input object is of class caps
.
Examples
as_caps(sim30_caps)
is_caps(sim30_caps)