|
EmrysFilter 0.1.0
State estimation utilities in C++23 using Eigen
|
Action that removes the least probable points, as many as can be while their combined probability stays below fraction, renormalizing the rest.
More...
#include <EmrysFilter/Distributions/Upkeep.h>
Public Member Functions | |
| template<typename State> requires requires(State & state, typename State::Scalar logFraction) { state.pruneTail(logFraction); } | |
| std::expected< bool, WeightError > | operator() (State &state) const |
| Prunes state. | |
Public Attributes | |
| Scalar_ | fraction |
| the probability the points removed stay below | |
Action that removes the least probable points, as many as can be while their combined probability stays below fraction, renormalizing the rest.
The state is anything with pruneTail(logFraction), as for PruneBelow. Unlike a threshold on each point, the fraction bounds the probability removed, and so the change in the distribution in total variation, however many points there are, and it removes about the same light tail before a subdivide() as after it. It can remove a whole mode lighter than the fraction, which PruneBelow would keep if each of the mode's points were above its threshold. Scalar_ is the type of fraction, deduced from the one given (upkeep::pruneTail(1e-3f) holds a float).
|
inlinenodiscard |
Prunes state.