Stay organized with collections
Save and categorize content based on your preferences.
The ML.NORMALIZER function
This document describes the ML.NORMALIZER function, which lets you normalize
an array of numerical expressions using a given
p-norm.
Syntax
ML.NORMALIZER(array_expression [, p])
Arguments
ML.NORMALIZER takes the following arguments:
array_expression: an array of
numerical
expressions to normalize.
p: a FLOAT64 value that specifies the degree of p-norm. This
can be 0.0, any value greater than or equal to 1.0, or
CAST('+INF' AS FLOAT64). The default value is 2.
Output
ML.NORMALIZER returns an array of FLOAT64 values that represent the
normalized numerical expressions.
Example
The following example normalizes a set of numerical expressions using a p-norm
of 2:
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-03-05 UTC."],[[["`ML.NORMALIZER` is a function used to normalize an array of numerical expressions using a specified p-norm."],["The function takes an `array_expression` of numerical values and an optional `p` parameter, which defaults to `2`, to determine the degree of p-norm."],["The function returns a new array consisting of `FLOAT64` values representing the normalized numerical expressions."],["The p-norm `p` parameter in `ML.NORMALIZER` can be `0.0`, any value greater than or equal to `1.0`, or `CAST('+INF' AS FLOAT64)`."]]],[]]