combine_weight_vectors¶
yohou.utils.weighting.combine_weight_vectors(*arrays, n)
¶
Combine weight vectors multiplicatively and normalize.
Filters out None inputs, multiplies the remaining arrays
element-wise, then normalizes so the result sums to n.
Parameters¶
| Name | Type | Description | Default |
|---|---|---|---|
*arrays
|
ndarray or None
|
Weight arrays to combine. |
()
|
n
|
int
|
Target sum after normalization (typically the number of rows). |
required |
Returns¶
| Type | Description |
|---|---|
ndarray or None
|
Combined, normalized weight array, or |
Raises¶
| Type | Description |
|---|---|
ValueError
|
If the combined product sums to zero. |