
Last chance! 50% off unlimited learning
Sale ends in
Method to plot data stream data. To plot DSC see plot.DSC()
.
# S3 method for DSD
plot(
x,
n = 500,
col = NULL,
pch = NULL,
...,
method = c("pairs", "scatter", "pca", "ts"),
dim = NULL,
alpha = 0.6,
transform = NULL
)
the DSD object to be plotted.
number of plots taken from x
to plot.
colors used for points.
symbol type.
further arguments are passed on to graphics::plot.default()
or graphics::pairs()
.
method used for plotting: "pairs"
(pairs plot), "scatter"
(scatter plot), "pca"
(plot first 2 principal components), or "ts"
(time series).
an integer vector with the dimensions to plot. If NULL
then for methods pairs
and "pca"
all dimensions are used and
for "scatter"
the first two dimensions are plotted.
alpha shading used to plot the points.
a function that maps data stream points onto a 2-D plane for plotting.
Michael Hahsler
Other DSD:
DSD_BarsAndGaussians()
,
DSD_Benchmark()
,
DSD_Cubes()
,
DSD_Gaussians()
,
DSD_MG()
,
DSD_Memory()
,
DSD_Mixture()
,
DSD_NULL()
,
DSD_ReadDB()
,
DSD_ReadStream()
,
DSD_Target()
,
DSD_UniformNoise()
,
DSD_mlbenchData()
,
DSD_mlbenchGenerator()
,
DSD()
,
DSF()
,
animate_data()
,
close_stream()
,
get_points()
,
reset_stream()
Other plot:
animate_cluster()
,
animate_data()
,
plot.DSC()
stream <- DSD_Gaussians(k=3, d=3)
## plot data
plot(stream, n = 500)
plot(stream, method = "pca", n = 500)
plot(stream, method = "scatter", dim = c(1, 3), n = 500)
## create and plot micro-clusters
dstream <- DSC_DStream(gridsize = 0.1)
update(dstream, stream, 500)
plot(dstream)
## plot with data, projected on the first two principal components
## and dimensions 2 and 3
plot(dstream, stream)
plot(dstream, stream, method = "pca")
plot(dstream, stream, dim = c(2, 3))
## plot micro and macro-clusters
plot(dstream, stream, type = "both")
## plot a time series using the AirPassenger data with the total monthly
## passengers from 1949 to 1960) a as a stream
AirPassengers
stream <- DSD_Memory(data.frame(
.time = time(AirPassengers),
passengers = AirPassengers))
get_points(stream, n = 10)
plot(stream, n = 100, method = "ts")
Run the code above in your browser using DataLab