View source: R/dsg_benchmark.R
| dsg_stream | R Documentation |
Builds a stream segment by segment. Each character of
pattern first induces a drift with dsg_drift() ("-" or "_" none,
"v" virtual, "r" real, "c" both, "a" any) and then draws
batch_size samples from the resulting concept.
dsg_stream(source, pattern, batch_size = 500)
source |
|
pattern |
Drift pattern, such as |
batch_size |
Number of samples per segment. |
list with
data: data frame with the features, the label y, the segment
and the drift code of the segment (0 none, 1 virtual, 2 real, 3 both, as
in the reference implementation);
segments: one row per segment with the drift type, the concept and
the verification statistics;
source: the source in its final concept.
set.seed(3)
# small settings keep the example fast; use the defaults for real benchmarks
source <- dsg_sea(n_perm = 200, test_size = 300, init_size = 300, n_clusters = 8)
stream <- dsg_stream(source, "-v-r", batch_size = 100)
head(stream$data)
stream$segments
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.