Mv¶
Mv artificial dataset.
Artificial dataset composed of both nominal and numeric features, whose features present co-dependencies. Originally described in 1.
The features are generated using the following expressions:
-
: uniformly distributed over[-5, 5]
. -
: uniformly distributed over[-15, -10]
. -
:-
if
,'green'
-
else
'red'
with probability and'brown'
with probability .
-
-
:-
if
'green'
, -
else
with probability and with probability .
-
-
: uniformly distributed over[-1, 1]
. -
, where is uniformly distributed over[0, 5]
. -
:'yes'
with probability , and'no'
with probability . -
:'normal'
if else'large'
. -
: uniformly distributed over[100, 500]
. -
: uniformly distributed integer over the interval[1000, 1200]
.
The target value is generated using the following rules:
-
if
, -
else if
, -
else if
'yes'
, -
else if
'normal'
, -
else
.
Parameters¶
-
seed (int) – defaults to
None
Random seed number used for reproducibility.
Attributes¶
-
desc
Return the description from the docstring.
Examples¶
>>> from river import synth
>>> dataset = synth.Mv(seed=42)
>>> for x, y in dataset.take(5):
... print(list(x.values()), y)
[1.39, -14.87, 'green', -28.35, -0.44, -31.64, 'no', 'normal', 370.67, 1178.43] -30.25
[-4.13, -12.89, 'red', -2.06, 0.01, -0.27, 'yes', 'normal', 359.95, 1108.98] 1.00
[-2.79, -12.05, 'brown', -1.39, 0.61, -4.87, 'no', 'large', 162.19, 1191.44] 15.59
[-1.63, -14.53, 'red', -7.26, 0.20, -29.33, 'no', 'normal', 314.49, 1194.62] -30.96
[-1.21, -12.23, 'brown', -6.11, 0.72, -17.66, 'no', 'large', 118.32, 1045.57] -0.60
Methods¶
take
Iterate over the k samples.
Parameters
- k (int)