Reducing (Variance) | the gap between my weights
Try the softmax function:
weights = [0.01, 0.1, 0.4, 0.6, 0.8, 0.997]

temperature = 1
weights = np.array(weights) / temperature
new_weights = np.exp(weights) / np.exp(weights).sum() # softmax function

You can tweak the temperature hyperparameter.
Higher the value - the &quot;new_weights&quot; come closer - yet order is preserved