Constructs a click-plot for the provided clustering solution. Click-plot is a graphical display representing relative transition frequencies for the partitioning specified via the parameter 'id'. If the parameter 'file' is specified, the constructed plot will be saved in the pdf-file with the name 'file'. If the width of observation lines 'obs.lwd' is not specified, median colors will be used for all cell segments.
Author(s)
Melnykov, V.
References
Melnykov, V. (2014) Model-based biclustering of clickstream data, accepted by Computational Statistics & Data Analysis.
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(ClickClust)
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/ClickClust/ClickPlot.Rd_%03d_medium.png", width=480, height=480)
> ### Name: click.plot
> ### Title: Plot of the obtained clustering solution
> ### Aliases: click.plot
> ### Keywords: click-plot EM algorithm Markov model
>
> ### ** Examples
>
>
> set.seed(123)
>
> n.seq <- 200
>
> p <- 5
> K <- 2
> mix.prop <- c(0.3, 0.7)
>
>
> TP1 <- matrix(c(0.20, 0.10, 0.15, 0.15, 0.40,
+ 0.20, 0.20, 0.20, 0.20, 0.20,
+ 0.15, 0.10, 0.20, 0.20, 0.35,
+ 0.15, 0.10, 0.20, 0.20, 0.35,
+ 0.30, 0.30, 0.10, 0.10, 0.20), byrow = TRUE, ncol = p)
>
> TP2 <- matrix(c(0.15, 0.15, 0.20, 0.20, 0.30,
+ 0.20, 0.10, 0.30, 0.30, 0.10,
+ 0.25, 0.20, 0.15, 0.15, 0.25,
+ 0.25, 0.20, 0.15, 0.15, 0.25,
+ 0.10, 0.30, 0.20, 0.20, 0.20), byrow = TRUE, ncol = p)
>
>
> TP <- array(rep(NA, p * p * K), c(p, p, K))
> TP[,,1] <- TP1
> TP[,,2] <- TP2
>
>
> # DATA SIMULATION
>
> A <- click.sim(n = n.seq, int = c(10, 50), alpha = mix.prop, gamma = TP)
> C <- click.read(A$S)
>
>
> # EM ALGORITHM
>
> M2 <- click.EM(X = C$X, y = C$y, K = 2)
>
>
> # CONSTRUCT CLICK-PLOT
>
> click.plot(X = C$X, y = C$y, file = NULL, id = M2$id)
>
>
>
>
>
>
> dev.off()
null device
1
>