I have an array of values (probabilities) as below,
a = [0, 0.1, 0.9, 0.2, 0, 0.8, 0.7, 0]
To select the maximum value from this array I can use the generalized mean equation. But what should I do if I want to select say top N values and sum them?
e.g. summing top 2 values will give me 0.9 + 0.8 = 1.7
**** But I dont need an implementation/algorithm for it. I need a mathematical equation (e.g. generalized mean for selecting the max value), so that I want to optimize a function which includes this selection.