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