hanaml.bernoulli.RdDraw samples from a Bernoulli distribution.
hanaml.bernoulli( connection.context, m = NULL, p = NULL, seed = NULL, thread.ratio = NULL )
| connection.context |
|
|---|---|
| m |
|
| p |
|
| seed |
Note that when multithreading is enabled, the random number sequences
of different runs might be different even if the |
| thread.ratio |
|
DataFrame containing the generated random samples, structured as follows:
ID: type INTEGER, ID column
GENERATED_NUMBER: type DOUBLE, sample values
Draw samples from a bernoulli distribution:
> bernoulli <- hanaml.bernoulli(connection.context = conn,
m = 20,
p = 0.5,
seed = 1,
thread.ratio = 0)
Output:
> bernoulli$labels
ID GENERATED_NUMBER
1 0 0
2 1 0
3 2 1
4 3 1
5 4 0
6 5 1
7 6 1
8 7 0
9 8 1
10 9 0