[ConceptDriftStream] How generate a sinthetic dataset with set size? #1152
Closed
albertfrancajosuacosta
started this conversation in
General
Replies: 2 comments 3 replies
-
Hey there. It's a good question! The answer is actually quite simple. The trick is that You're looking for an abrupt drift, which can done by simply concatenating datasets. In Python, the import itertools
from river import datasets
dataset = itertools.chain(
datasets.synth.SEA(seed=42, variant=0).take(1000),
datasets.synth.SEA(seed=42, variant=1).take(1000)
)
for x, y in dataset:
... I hope that helps! Have a good week. |
Beta Was this translation helpful? Give feedback.
3 replies
-
Resolved. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey.
I need to generate a sinthetic dataset with set size, this dataset there are concept drift.
Example.
stream1 = Sine with classification function equal to 1 and with size of 1000 samples.
stream2 = Sine with classification function equal to 0 and with size of 1000 samples.
stream3 - Sine with classification function equal to 2 and with size of 1000 samples.
final_stream = concate (stream1, stream2, stream3) with size of 3000 samples.
When i try
dataset = synth.ConceptDriftStream(stream=synth.SEA(seed=42, variant=0), drift_stream=synth.SEA(seed=42, variant=1), seed=1, position=5, width=2)
I get a dataset with number of samples equal to infinity.
In the last code, if i try
dataset.take(2000):
I will have the first 1000 sample of stream and the last 1000 samples of drift_stream ?
I need to generate more that 1 drift, similar to how it's done in Weka?
Thank you.
Albert França Josuá Costa
Beta Was this translation helpful? Give feedback.
All reactions