Stay organized with collections
Save and categorize content based on your preferences.
The ML.STANDARD_SCALER function
This document describes the ML.STANDARD_SCALER function, which lets you scale
a numerical expression by using
z-score.
When used in the
TRANSFORM clause,
the standard deviation and
mean values calculated to standardize the
expression are automatically used in prediction.
Syntax
ML.STANDARD_SCALER(numerical_expression) OVER()
Arguments
ML.STANDARD_SCALER takes the following argument:
numerical_expression: the
numerical
expression to scale.
Output
ML.STANDARD_SCALER returns a FLOAT64 value that represents the scaled
numerical expression.
Example
The following example scales a set of numerical expressions to have a
mean of 0 and standard deviation of 1:
[[["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.STANDARD_SCALER\u003c/code\u003e scales a numerical expression using the z-score method.\u003c/p\u003e\n"],["\u003cp\u003eWhen used in the \u003ccode\u003eTRANSFORM\u003c/code\u003e clause, the calculated standard deviation and mean are automatically used in prediction.\u003c/p\u003e\n"],["\u003cp\u003eThe function takes a single argument, \u003ccode\u003enumerical_expression\u003c/code\u003e, which is the numerical data to be scaled.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eML.STANDARD_SCALER\u003c/code\u003e outputs a \u003ccode\u003eFLOAT64\u003c/code\u003e value that represents the scaled numerical expression, resulting in a mean of 0 and a standard deviation of 1.\u003c/p\u003e\n"],["\u003cp\u003eThere is a provided example of how to use the function and the output it produces.\u003c/p\u003e\n"]]],[],null,[]]