Generates an animation of a data stream clustering process.
Arguments
- dsc
a DSC
- dsd
a DSD
- measure
the evaluation measure that should be graphed below the animation (see
evaluate_stream().)- horizon
the number of points displayed at once/used for evaluation.
- n
the number of points to be plotted
- type, assign, assignmentMethod, excludeNoise
are passed on to
evaluate_stream()to calculate the evaluation measure.- wait
the time interval between each frame
- plot.args
a list with plotting parameters for the clusters.
- ...
extra arguments are added to
plot.args.
Details
Animations are recorded using the library animation and can be replayed (which gives a smoother experience since the is no more computation done) and saved in various formats (see Examples section below).
Note: You need to install package animation and its system requirements.
See also
animation::ani.replay() for replaying and saving animations.
Other DSC:
DSC(),
DSC_Macro(),
DSC_Micro(),
DSC_R(),
DSC_SlidingWindow(),
DSC_Static(),
DSC_TwoStage(),
evaluate.DSC,
get_assignment(),
plot.DSC(),
predict,
prune_clusters(),
read_saveDSC,
recluster()
Other plot:
animate_data(),
plot.DSC(),
plot.DSD()
Other evaluation:
evaluate,
evaluate.DSC
Examples
if (interactive()) {
stream <- DSD_Benchmark(1)
### animate the clustering process with evaluation
### Note: we choose to exclude noise points from the evaluation
### measure calculation, even if the algorithm would assign
### them to a cluster.
dbstream <- DSC_DBSTREAM(r = .04, lambda = .1, gaptime = 100, Cm = 3,
shared_density = TRUE, alpha = .2)
animate_cluster(dbstream, stream, horizon = 100, n = 5000,
measure = "crand", type = "macro", assign = "micro",
plot.args = list(xlim = c(0, 1), ylim = c(0, 1), shared = TRUE))
}