PriorThresholdPruner#

class PriorThresholdPruner(threshold)[исходный код]#

Базовые классы: Pruner

Component pruner based on a prior weight threshold.

Removes components whose weight is strictly below threshold. Guarantees that at least one component remains in the mixture. Remaining weights are renormalized.

Параметры:

threshold (Scalar) – Minimum weight to retain a component. Must be strictly between 0 and 1.

Переменные:

threshold (float) – Configured weight threshold.

Исключение:

ValueError – If threshold is not in the exclusive range (0, 1).

Methods

prune(state)

Remove components with weights below threshold, retaining at least one component.