rtbgym.utils#
Useful tools.
Functions
Input validation on array. |
|
Sigmoid function |
Classes
Class to sample from normal distribution. |
- class rtbgym.utils.NormalDistribution(mean, std, random_state=None)[source]#
Class to sample from normal distribution.
- Parameters:
- Attributes:
- random_state
Methods
sample([size])Sample random variables from the pre-determined normal distribution.
- sample(size=1)[source]#
Sample random variables from the pre-determined normal distribution.
- Parameters:
size (int, default=1 (> 0)) – Total number of the random variable to sample.
- Returns:
random_variables – Random variables sampled from the normal distribution.
- Return type:
ndarray of shape (size, )
- rtbgym.utils.check_array(array, name, expected_dim=1, expected_dtype=None, min_val=None, max_val=None)[source]#
Input validation on array.
- Parameters:
array (object) – Input array to check.
name (str) – Name of the input array.
expected_dim (int, default=1) – Expected dimension of the input array.
expected_dtype ({type, tuple of type}, default=None) – Expected dtype of the input array.
min_val (float, default=None) – Minimum value allowed in the input array.
max_val (float, default=None) – Maximum value allowed in the input array.