PriorThresholdPruner#
- class PriorThresholdPruner(threshold)[source]#
Bases:
PrunerA pruner that removes mixture components based on a weight threshold.
This pruner iterates through the components of a
rework_pysatl_mpest.core.MixtureModelafter a pipeline iteration and removes any component whose weight is less than the specifiedthreshold. This helps to simplify the model and discard insignificant components. The weights of the remaining components are automatically renormalized.- Parameters:
threshold (float) – The minimum weight a component must have to be retained. This value must be in the exclusive range (0, 1).
- Variables:
threshold (float) – Stores the weight threshold used for pruning.
- Raises:
ValueError – If
thresholdis not strictly between 0 and 1.
Methods
prune(state)Removes components from the mixture whose weights are below the threshold.