ClusterWithMeanCurve: Cluster Curves

View source: R/ClusterWithMeanCurves.R

ClusterWithMeanCurveR Documentation

Cluster Curves

Description

Visualizes the plots regarding the fitted and clustered data by exploiting the FCM.

Usage

ClusterWithMeanCurve(
  clusterdata,
  feature,
  title = "",
  labels = c("", ""),
  save = FALSE,
  path = NULL
)

Arguments

clusterdata

The list obtained from extrapolating the most probable clustering from the StabilityAnalysis function output. (see StabilityAnalysis and MostProbableClustering.Extrapolation).

feature

The column name reported in the AnnotationFile containing the feature to be investigated.

title

The string containing the plot title.

labels

The vector containing the axis names.

save

If TRUE then the following objects are saved: (i) the mean curves plot, (ii) the plots of each cluster showing the correspondive mean curve and the samples belonging to the cluster, (iii) one plot storing all the clustering plots, and (iv) the tables reporting the M, S, R and fDB indexes considering the 0, 1 and 2 derivatives.

path

The folder path where the plots will be saved. If it is missing, the plots are saved in the current working directory.

Details

We define the following indexes for obtaining a cluster separation measure:

  • S_k:

    S_k = \sqrt{\frac{1}{G_k} \sum_{i=1}^{G_k} D_q^2(\hat{g}_i, \bar{g}^k);}

    with G_k the number of curves in the k-th cluster;

  • M_hk: the distance between centroids (mean-curves) of h-th and k-th cluster

    M_{hk} = D_q(\bar{g}^h, \bar{g}^k);

  • R_hk: a measure of how good the clustering is,

    R_{hk} = \frac{S_h + S_k}{M_{hk}};

  • fDB_q: functional Davies-Bouldin index, the cluster separation measure

    fDB_q = \frac{1}{G} \sum_{k=1}^G \max_{h \neq k} { R_{hk} }.

Where the proximities measures choosen is defined as follow

D_q(f,g) = \sqrt( \integral | f^{(q)}(s)-g^{(q)}(s) |^2 ds ), d=0,1,2

with f and g are two curves and f^(q) and g^(q) are their q-th derivatives. Note that for q=0, the equation becomes the distance induced by the classical L^2-norm.

Value

ClusterWithMeanCurve returns a list with three objects:

  • PlotsCluster:a list storing the growth curves plots partitioned according to the cluster membership;

  • PlotMeanCurve:the cluster mean curves plot;

  • spline.plots:a list of N plots, where N is the number of samples, showing: (i) in blue the sample curve, (ii) in red the cubic spline estimated from the FCM, (iii) in black the correspondive cluster mean curve, and finally (iv) the grey area represents the confidence interval.

Author(s)

Cordero Francesca, Pernice Simone, Sirovich Roberta

See Also

MostProbableClustering.Extrapolation, StabilityAnalysis, Spline.plots.


sysbioTurin/connector documentation built on April 9, 2024, 12:10 p.m.