hanaml.lognormal {hana.ml.r}R Documentation

Lognormal Distribution Sampling

Description

Draw samples from a lognormal distribution.

Usage

hanaml.lognormal(conn.context,
                        m = NULL,
                        location = NULL,
                        scale = NULL,
                        seed = NULL,
                        thread.ratio = NULL)

Arguments

conn.context

ConnectionContext
Database connection object.

m

integer, optional
Standard deviation of the underlying normal distribution. Defaults to 1

location

numeric, optional
Location parameter for lognormal distribution.
Defaults to 0.

scale

numeric, optional
Scale parameter for lognormal distribution.
Defaults to 1.

seed

integer, optional
Indicates the seed used to initialize the random number generator:
- 0: Uses the system time.
- Not 0: Uses the specified seed. Note that when multithreading is enabled, the random number sequences of different runs might be different even if the SEED value remains the same.
Defaults to 0.

thread.ratio

numeric, optional
Controls the proportion of available threads to use. The value range is from 0 to 1, where 0 indicates a single thread, and 1 indicates up to all available threads. Values between 0 and 1 will use that percentage of available threads. Values outside this range tell PAL to heuristically determine the number of threads to use.
Defaults to 0.

Value

DataFrame containing the generated random samples, random samples:
- ID, type INTEGER, ID column.
- GENERATED_NUMBER, type DOUBLE, sample value.

Examples

## Not run: 
Draw samples from a lognormal distribution.
  lognormal <- hanaml.lognormal(conn, location = 0.6, scale = 1, m = 20, seed = 1,
                                thread.ratio = 0)
> exponential$collect()
    ID  GENERATED_NUMBER
0   0          0.461803
1   1          0.548432
2   2          0.625874
3   3          3.038529
4   4          3.582703
5   5          1.867543
6   6          1.853857
7   7          0.378827
8   8          1.104031
9   9          0.840102


## End(Not run)

[Package hana.ml.r version 1.0.8 Index]