AveragersΒΆ
This module provides implementations of unit averaging strategies.
The package implements several specific averaging schemes (optimal, mean group, individual-specific). It also provides the possibility of defining custom averaging scheme by inheriting from BaseUnitAverager
and implementing appropriate weight schemes.
Available averagers:
Class |
Description |
---|---|
Abstract base class. Subclass and implement |
|
Assigns all weight to the target unit ( |
|
Equal weights for all units ( |
|
MSE-optimal weights (agnostic and with prior restrictions). |
All averagers share a common interface:
Fitting: Call
fit(target_id)
to compute weights and compute the unit averaging estimator for the focus function supplied to the class constructor.Averaging: Use
average()
to recompute the averaging estimator
See also
Tutorials for worked examples
Focus Functions for information on focus functions.
About Unit Averaging for theoretical background on the implemented schemes.