f
- hana_ml.algorithms.pal.random.f(conn_context, dof1=1, dof2=1, num_random=100, seed=None, thread_ratio=None)
Draw samples from an f distribution.
- Parameters
- conn_contextConnectionContext
Database connection object.
- dof1int, optional
DEGREES_OF_FREEDOM1.
Defaults to 1.
- dof2int, optional
DEGREES_OF_FREEDOM2.
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
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 the range [0, 1] tell PAL to heuristically determine the number of threads to use.
Defaults to 0.
- Returns
- DataFrame
Dataframe containing the generated random samples, structured as follows:
ID, type INTEGER, ID column.
GENERATED_NUMBER, type DOUBLE, sample value.
Examples
Draw samples from a f distribution.
>>> res = f(conn_context=cc, dof1=1, dof2=1, num_random=10) >>> res.collect() ID GENERATED_NUMBER 0 0 6.494985 1 1 0.054830 2 2 0.752216 3 3 4.946226 4 4 0.167151 5 5 351.789925 6 6 0.810973 7 7 0.362714 8 8 0.019763 9 9 10.553533