weibull
- hana_ml.algorithms.pal.random.weibull(conn_context, shape=1, scale=1, num_random=100, seed=None, thread_ratio=None)
-
Draw samples from a weibull distribution.
- Parameters:
-
- conn_contextConnectionContext
-
Database connection object.
- shapefloat, optional
-
Defaults to 1.
- scalesfloat, optional
-
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.
Note
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.
- Returns:
-
- DataFrame
-
Dataframe containing the generated random samples.
Examples
Draw samples from a weibull distribution.
>>> res = weibull(conn_context=cc, shape=1, scale=1, num_random=10) >>> res.collect() ID GENERATED_NUMBER 0 0 2.188750 1 1 0.247628 2 2 0.339884 3 3 0.902187 4 4 0.909629 5 5 0.514740 6 6 4.627877 7 7 0.143767 8 8 0.847514 9 9 2.368169