hanaml.weibull.Rd
Draw samples from a weibull distribution.
hanaml.weibull(
connection.context,
m = NULL,
shape = NULL,
scale = NULL,
seed = NULL,
thread.ratio = NULL
)
ConnectionContext
SAP HANA Database connection object.
integer, optional
Specifies the number of random data to be generated.
Defaults to 100.
numeric, optional
Defaults to 1.
numeric, optional
Defaults to 1.
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.
double, optional
Controls the proportion of available threads that can be used by this
function.
The value range is from 0 to 1, where 0 indicates a single thread,
and 1 indicates all available threads.
Values between 0 and 1 will use up to
that percentage of available threads.Values outside this
range are ignored.
Defaults to 0.
DataFrame containing the generated random samples, structured as follows:
ID: type INTEGER, ID column
GENERATED_NUMBER: type DOUBLE, sample values
Draw samples from a weibull distribution:
> weibull <- hanaml.weibull(connection.context = conn,
m = 20,
shape = 2,
scale = 3,
seed = 1,
thread.ratio = 0)
Output:
> weibull$collect()
ID GENERATED_NUMBER
1 0 2.188750
2 1 0.247628
3 2 0.339884
4 3 0.902187
5 4 0.909629
6 5 0.514740
7 6 4.627877
8 7 0.143767
9 8 0.847514
10 9 2.368169