zero_vs_many_entities
Note
ID: catalog.operators.balancers.ner.zero_vs_many_entities | 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_boudaries)
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.