NORMALIZE
All functions > ARRAY > NORMALIZE
Normalizes a numeric array by dividing each element by the sum of all elements.
Signatures
Returns: Normalized array where elements sum to 1
NORMALIZE(array: ARRAY<DOUBLE>) → ARRAY<DOUBLE> sql
| Parameter | Type | Required | Description |
|---|---|---|---|
array | ARRAY<DOUBLE> | Yes | Array of numeric values to normalize |
Notes
- Divides each element by sum of all elements
- Result sums to 1.0 (probability distribution)
- Useful for creating probability vectors
- Returns array of doubles
On this page