plot: Methods for Function 'plot' in Package 'funcy'

Description Usage Arguments Details References Examples

Description

Plots clustered curves and/or cluster centers and other results.

Usage

1
2
3
4
5
6
7
8
## S4 method for signature 'funcyOut,missing'
plot(x, y, data, type="all",
     showLegend=TRUE, legendPlace="bottomleft", main, ...)

## S4 method for signature 'funcyOutList,missing'
plot(x, y, data=NULL,
     select=NULL, type="all", showLegend=TRUE,
     legendPlace="bottomleft", main, ...)

Arguments

x

An object of class "funcyOut" or "funcyOutList".

y

Not used.

data

Data to include in plot. If the cluster object x is of type "funcyOutList" that was created with save.data=TRUE, then these are used by default.

select

Select the methods, you want to generate the plot for.

type

Plot type, see details.

showLegend

If TRUE, cluster legend is shown.

legendPlace

Legend placement.

main

Plot title, can be missing.

...

Further plotting parameters

Details

If data was clustered by funcit with save.data=TRUE, different plots can be used. Some plots are available for all methods, others depend on method which was used. The plot types are listed below. If method specific plots are used, method must be extracted by select=method name, see examples.

"all methods":
all:

Plots data and cluster centers.

centers:

Plots only cluster centers.

shadow:

Creates a shadow plot (see function shadow in package flexclust - Leisch 2010).

dist2centers:

Multiple plots for each cluster. Thickness of lines corresponds to the proximity to the cluster centers. Thicker lines means curve is closer to its center.

fpc:

Only if baseType="eigenbasis" in funcyCtrl. Plots the smoothed mean function, covariance matrix and eigenbasis.

"fitfclust":
discrim

Plots discriminant functions to show the time points of maximum discrimination between clusters (see James2003).

conf

Plots confidence intervals for the curves.

"fscm":
overview:

Plots curve locations, temporal trends and overall trends (see Serban2012). For the spatial coefficients, dots are colored according to spatial dependency from yellow to blue. Darker dots mean stronger dependency.

References

Christina Yassouridis and Dominik Ernst and Friedrich Leisch. Generalization, Combination and Extension of Functional Clustering Algorithms: The R Package funcy. Journal of Statistical Software. 85 (9). 1–25. 2018

Friedrich Leisch. Neighborhood graphs, stripes and shadow plots for cluster visualization. Statistics and Computing. 20(4). 457–469. 2010

Gareth James and Catherine A. Sugar. Clustering for Sparsely Sampled Functional Data. Journal of the American Statistical Association. 98 (462). 297–408. 2003

Nicoleta Serban and Huijing Jiang.Clustering Random Curves Under Spatial Interdependence With Application to Service Accessibility. Technometrics. 54 (2). 108–119. 2012

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
set.seed(2804)
ds <- sampleFuncy(obsNr=60, k=4, timeNrMin=5, timeNrMax=10, reg=FALSE)
data <- Data(ds)
clusters <- Cluster(ds)
res <- funcit(data=data, clusters=clusters,
              methods=c("fitfclust","distclust", "iterSubspace") ,
              k=4, parallel=TRUE)
plot(res)
plot(res, select="fitfclust", type="conf")
plot(res, select="fitfclust", type="discrim")
plot(res, select="distclust", type="shadow")

funcy documentation built on May 2, 2019, 9:22 a.m.

Related to plot in funcy...