hana_ml.algorithms.pal.random.lognormal(conn_context, mean=0, sigma=1, num_random=100, seed=None, thread_ratio=None)

Draw samples from a lognormal distribution.


Database connection object.

meanfloat, optional

Mean value of the underlying normal distribution.

Defaults to 0.

sigmafloat, optional

Standard deviation of the underlying normal distribution.

Defaults to 1.

num_randomint, optional

Specifies the number of random data to be generated.

Defaults to 100.

seedint, optional

Indicates the seed used to initialize the random number generator:

  • 0: Uses the system time.

  • Not 0: Uses the specified seed.


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_ratiofloat, optional

Adjusts the percentage of available threads to use, from 0 to 1. A value of 0 indicates the use of a single thread, while 1 implies the use of all possible current threads. Values outside the range will be ignored and this function heuristically determines the number of threads to use.

Defaults to 0.


Dataframe containing the generated random samples.


>>> res = lognormal(conn_context=cc, mean=0, sigma=1, num_random=10)
>>> res.collect()