| caps | R Documentation |
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.
as_caps(x)
is_caps(x)
x |
A list coercible into an object of class |
An object of class caps is a list with the following components:
original_curves: A numeric matrix of shape N \times L \times M
storing a sample with the N L-dimensional original curves
observed on grids of size M.
original_grids: A numeric matrix of size N \times M storing the
grids of size M on which original curves are evaluated;
aligned_grids: A numeric matrix of size N \times M storing the
grids of size M on which original curves must be evaluated to be
aligned;
center_curves: A numeric matrix of shape K \times L \times M
storing the K centers which are L-dimensional curves observed on
a grid of size M;
center_grids: A numeric matrix of size K \times M storing the grids
of size M on which center curves are evaluated;
warpings: A numeric matrix of shape N \times M storing the
estimated warping functions for each of the N curves evaluated on the
within-cluster common grids of size M;
n_clusters: An integer value storing the number of clusters;
memberships: An integer vector of length N storing the cluster ID
which each curve belongs to;
distances_to_center: A numeric vector of length N storing the
distance of each curve to the center of its cluster;
silhouettes: A numeric vector of length N 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 function call_name that produced this output.
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.
as_caps(sim30_caps)
is_caps(sim30_caps)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.