skactiveml.utils.rand_argmax#
- skactiveml.utils.rand_argmax(a, random_state=None, **argmax_kwargs)[source]#
Returns index of maximum value. In case of ties, a randomly selected index of the maximum elements is returned.
- Parameters
- a: array-like
Indexable data-structure of whose maximum element’s index is to be determined.
- random_state: int, RandomState instance or None, optional (default=None)
Determines random number generation for shuffling the data. Pass an int for reproducible results across multiple function calls.
- argmax_kwargs: dict-like
Keyword argument passed to numpy function argmax.
- Returns
- index_array: ndarray of ints
Array of indices into the array. It has the same shape as a.shape with the dimension along axis removed.