Template Function beluga::clusterizer_detail::normalize_and_cap_weights

Function Documentation

template<class State>
static void beluga::clusterizer_detail::normalize_and_cap_weights(ClusterMap<State> &map, double percentile)

Normalize weights and cap them to a given percentile.

Given a valid cluster map, normalize the accumulated weight by the number of particles in each cell to avoid biasing the clustering algorithm towards cells that randomly end up with more particles than others.

Then cap the values to a given percentile to flatten the top of the approximated density function and make the clustering algorithm more robust to estimation noise, by fusing together any adjacent peaks whose weight is above the threshold.

Template Parameters:

State – The state type of the cells in the map.

Parameters:
  • map – A reference to the map where cells are stored.

  • percentile – The percentile threshold for capping the weights.