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-08-07 UTC."],[[["\u003cp\u003e\u003ccode\u003eML.NORMALIZER\u003c/code\u003e is a function used to normalize an array of numerical expressions using a specified p-norm.\u003c/p\u003e\n"],["\u003cp\u003eThe function takes an \u003ccode\u003earray_expression\u003c/code\u003e of numerical values and an optional \u003ccode\u003ep\u003c/code\u003e parameter, which defaults to \u003ccode\u003e2\u003c/code\u003e, to determine the degree of p-norm.\u003c/p\u003e\n"],["\u003cp\u003eThe function returns a new array consisting of \u003ccode\u003eFLOAT64\u003c/code\u003e values representing the normalized numerical expressions.\u003c/p\u003e\n"],["\u003cp\u003eThe p-norm \u003ccode\u003ep\u003c/code\u003e parameter in \u003ccode\u003eML.NORMALIZER\u003c/code\u003e can be \u003ccode\u003e0.0\u003c/code\u003e, any value greater than or equal to \u003ccode\u003e1.0\u003c/code\u003e, or \u003ccode\u003eCAST('+INF' AS FLOAT64)\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,[]]