Mixture Reducers
- class stonesoup.mixturereducer.gaussianmixture.GaussianMixtureReducer(prune_threshold: float = 1e-09, merge_threshold: float = 16, max_number_components: int = 9223372036854775807, merging: bool = True, pruning: bool = True, truncating: bool = True, kdtree_max_distance: float = None)[source]
Bases:
MixtureReducerGaussian Mixture Reducer class:
Reduces the number of components in a Gaussian mixture to increase computational efficiency. See [1] for details. Achieved in three ways: pruning, merging, and truncating. Pruning is the act of removing low weight components from the mixture that fall below a pruning threshold. Merging is the act of combining similar components in the mixture that fall with a distance threshold into a single component. Truncating is the act of removing low weight components from the mixture so that the number of components in the mixture stays below a given threshold. Truncating is performed after the pruning and merging.
References
[1] B.-N. Vo and W.-K. Ma, “The Gaussian Mixture Probability Hypothesis Density Filter,” Signal Processing,IEEE Transactions on, vol. 54, no. 11, pp. 4091–4104, 2006..
- Parameters:
prune_threshold (
float, optional) – Mixture component weight threshold for pruningmerge_threshold (
float, optional) – Squared Mahalanobis distance threshold for mergingmax_number_components (
int, optional) – Maximum number of components to keep in the Gaussian mixturemerging (
bool, optional) – Flag for mergingpruning (
bool, optional) – Flag for pruning components whose weight is belowprune_thresholdtruncating (
bool, optional) – Flag for truncating components, keeping a maximum ofmax_number_componentscomponentskdtree_max_distance (
float, optional) – This defines the max Euclidean search distance for a kd-tree, used as part of the merge process as a coarse gate. Default None where tree isn’t used and all components are checked against the merge threshold.
- pruning: bool
Flag for pruning components whose weight is below
prune_threshold
- truncating: bool
Flag for truncating components, keeping a maximum of
max_number_componentscomponents
- kdtree_max_distance: float
This defines the max Euclidean search distance for a kd-tree, used as part of the merge process as a coarse gate. Default None where tree isn’t used and all components are checked against the merge threshold.
- reduce(components_list)[source]
Reduce the components of Gaussian Mixture
listthrough pruning, merging, and truncating
- prune(components_list)[source]
Pruning is the act of removing low weight components from the mixture that fall below a pruning threshold
prune_threshold.- Parameters:
components_list (
list) – The components of Gaussian Mixture to be pruned- Returns:
remaining_components – Components that remain after pruning
- Return type:
GaussianMixtureState
- merge_components(component_1, component_2)[source]
Merge two similar components
- Parameters:
component_1 (
WeightedGaussianState) – First component to be mergedcomponent_2 (
WeightedGaussianState) – Second component to be merged
- Returns:
merged_component – Merged Gaussian component
- Return type:
- merge(components_list)[source]
Merging is the act of combining similar components in the mixture that fall with a distance threshold
merge_thresholdinto a single component.
- truncate(components_list)[source]
Truncating is the act of removing low-weight components from the mixture so that the size of the mixture (number of components) stays within the given threshold
max_number_components.- Parameters:
components_list (
list) – Components of the Gaussian Mixture to be truncated- Returns:
The
max_number_componentscomponents with the highest weights- Return type: