π zero_vs_many_labelsΒΆ
Note
ID: operators.balancers.multi_label.zero_vs_many_labels | Type: LengthBalancer
{
"fields": [
"outputs/labels"
],
"segments_boundaries": [
1
],
"type": "length_balancer"
}
Explanation about LengthBalancerΒΆ
Balances by a signature that reflects the total length of the fieldsβ values, quantized into integer segments.
- Args:
segments_boundaries (List[int]): distinct integers sorted in increasing order, that maps a given total length into the index of the least of them that exceeds the total length. (If none exceeds β into one index beyond, namely, the length of segments_boundaries)
fields (Optional, List[str])
- Example:
when input [{βaβ: [1, 3], βbβ: 0, βidβ: 0}, {βaβ: [1, 3], βbβ: 0, βidβ: 1}, {βaβ: [], βbβ: βaβ, βidβ: 2}] is fed into
LengthBalancer(fields=["a"], segments_boundaries=[1])input instances will be counted and balanced against two categories: empty total length (less than 1), and non-empty.
Read more about catalog usage here.