PriorThresholdPruner#

class PriorThresholdPruner(threshold)[source]#

Bases: Pruner

A pruner that removes mixture components based on a weight threshold.

This pruner iterates through the components of a rework_pysatl_mpest.core.MixtureModel after a pipeline iteration and removes any component whose weight is less than the specified threshold. 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 threshold is not strictly between 0 and 1.

Methods

prune(state)

Removes components from the mixture whose weights are below the threshold.