plot.DSC | R Documentation |
Method to plot the result of data stream data clustering. To plot DSD see plot.DSD()
.
## S3 method for class 'DSC'
plot(
x,
dsd = NULL,
n = 500,
col_points = NULL,
col_clusters = c("red", "blue", "green"),
weights = TRUE,
scale = c(1, 5),
cex = 1,
pch = NULL,
method = c("pairs", "scatter", "pca"),
dim = NULL,
type = c("auto", "micro", "macro", "both", "none"),
assignment = FALSE,
transform = NULL,
...
)
x |
the DSC object to be plotted. |
dsd |
a DSD object to plot the data in the background. |
n |
number of plots taken from |
col_points , col_clusters |
colors used for plotting. |
weights |
if |
scale |
range for the symbol sizes used. |
cex |
size factor for symbols. |
pch |
symbol type for points. |
method |
method used for plotting: |
dim |
an integer vector with the dimensions to plot. If |
type |
Plot micro clusters ( |
assignment |
logical; show assignment area of micro-clusters. |
transform |
a function that maps data stream points onto a 2-D plane for plotting. |
... |
further arguments are passed on to |
Michael Hahsler
Other DSC:
DSC()
,
DSC_Macro()
,
DSC_Micro()
,
DSC_R()
,
DSC_SlidingWindow()
,
DSC_Static()
,
DSC_TwoStage()
,
animate_cluster()
,
evaluate.DSC
,
get_assignment()
,
predict()
,
prune_clusters()
,
read_saveDSC
,
recluster()
Other plot:
animate_cluster()
,
animate_data()
,
plot.DSD()
stream <- DSD_Gaussians(k = 3, d = 3, noise = 0.05)
## Example 1: Plot data
plot(stream)
## Example 2: Plot a clustering
dstream <- DSC_DStream(gridsize = 0.1)
update(dstream, stream, 500)
dstream
plot(dstream, stream)
## plot micro or macro-clusters only
plot(dstream, stream, type = "micro")
plot(dstream, stream, type = "macro")
## plot projected on the first two principal components
## and on dimensions 2 and 3
plot(dstream, stream, method = "pca")
plot(dstream, stream, dim = c(2, 3))
## D-Stream has a special implementation to show assignment areas
plot(dstream, stream, assignment = TRUE)
## Example 4: Use a custom transformation for plotting.
## We fit PCA using 100 points and create a transformation
## function to project the stream to the first two PCs.
pr <- princomp(get_points(stream, n = 100, info = FALSE))
trans <- function(x) predict(pr, x)[, 1:2 , drop = FALSE]
trans(get_points(stream, n = 3))
plot(dstream, stream, transform = trans)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.