voiage.core.utils.get_optimal_strategy_index
get_optimal_strategy_index
Section titled “get_optimal_strategy_index”get_optimal_strategy_index([positional or keyword] nb_array: np.ndarray | ValueArray = None) -> np.ndarrayDetermine the optimal strategy for each PSA sample.
The optimal strategy for a given sample is the one with the maximum net benefit.
Args: nb_array (Union[np.ndarray, NetBenefitArray]): A 2D NumPy array of net benefits (samples x strategies) or a NetBenefitArray instance.
Returns
Section titled “Returns”np.ndarray: A 1D array of integers, where each element is the index of the optimal strategy for the corresponding sample.
Parameters:
nb_arraynp.ndarray | ValueArray
Returns: np.ndarray