Subsampled units¶
A score that is a sum over units is estimated
without bias by a subset of them
(subsampled units). unit_coefficients reads the
coefficient of each unit from the subsampled plates of a run, and refuses a subset that splits a unit.
unit_subsets
¶
Unit weights of a score whose plates are subsampled.
A score S = sum_u w(u) is a sum over its units, so a uniform subset of
the units, each weight scaled by the number of units over the number kept,
estimates it without bias. A subsampled plate keeps a subset of the units
when no unit has elements of the plate both inside and outside the subset.
A unit that has both is split: its weight is not a sum over its elements,
so no subset of them estimates it.
units_subsampled
¶
units_subsampled(factorization: UnitFactorization, subsets: Mapping[str, Tensor]) -> bool
Whether a subsampled plate concerns a score.
| PARAMETER | DESCRIPTION |
|---|---|
factorization
|
The score's units.
TYPE:
|
subsets
|
The positions kept of each subsampled plate.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
bool
|
|
Source code in src/quivers/continuous/unit_subsets.py
unit_coefficients
¶
unit_coefficients(factorization: UnitFactorization, env: Environment, subsets: Mapping[str, Tensor]) -> Tensor
The coefficient of each unit's weight under subsampled plates.
| PARAMETER | DESCRIPTION |
|---|---|
factorization
|
The score's units.
TYPE:
|
env
|
The run's values.
TYPE:
|
subsets
|
The positions kept of each subsampled plate.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
Tensor
|
|
| RAISES | DESCRIPTION |
|---|---|
ValueError
|
If a unit has elements of a subsampled plate inside and outside the subset, or the subsets of two plates would each select the units. |