1.1 - 8.10 - ScaleByPartition Syntax Elements - Teradata Vantage

Teradata Vantage™ - Machine Learning Engine Analytic Function Reference

Product
Teradata Vantage
Release Number
1.1
8.10
Release Date
October 2019
Content Type
Programming Reference
Publication ID
B700-4003-079K
Language
English (United States)
ScaleMethod
Specify one or more statistical methods to use to scale the data set. For method values and descriptions, see Location and Scale for Statistical Methods.

If you specify multiple methods, the output table includes the column scalemethod (which contains the method name) and a row for each input-row/method combination.

MissValue
[Optional] Specify how the ScaleByPartition function is to process NULL values in input:
Option Description
KEEP (Default) Keep NULL values.
OMIT Ignore any row that has a NULL value.
ZERO Replace each NULL value with zero.
LOCATION Replace each NULL value with its location value.
TargetColumns
Specify the input table columns that contain the values to scale. The columns must contain numeric values must between -1e308 and 1e308. If a value is outside this range, the function treats it as infinity.
GlobalScale
[Optional] Specify whether all input columns are scaled to the same location and scale.
Default: 'false' (Each input column is scaled separately.)
Accumulate
[Optional] Specify the input table columns to copy to the output table.
Tip: To identify the sequences in the output, specify the partition columns in this syntax element.
Multiplier
[Optional] Specify one or more multiplying factors to apply to the input variables (multiplier in this formula):

X' = intercept + multiplier * (X - location)/scale

If you specify only one multiplier, it applies to all columns specified by the TargetColumns syntax element.
If you specify multiple multiplying factors, each multiplier applies to the corresponding input column. For example, the first multiplier applies to the first column specified by the TargetColumns syntax element, the second multiplier applies to the second input column, and so on.
Default: multiplier is 1.
Intercept
[Optional] Specify one or more addition factors incrementing the scaled results—intercept in this formula:

X' = intercept + multiplier * (X - location)/scale

If you specify only one intercept, it applies to all columns specified by the TargetColumns syntax element. If you specify multiple addition factors, each intercept applies to the corresponding input column.
This is the syntax of intercept:
[-]{number | min | mean | max }
where min, mean, and max are the scaled global minimum, maximum, mean values of the corresponding columns.
This is the formula for computing the scaled global minimum:

scaledmin = (minX - location)/scale

The formulas for computing the scaled global mean and maximum are analogous to the preceding formula. For example, if intercept is '- min' and multiplier is 1, this is the formula for computing the scaled result X':

X' = -scaledmin + 1 * (X - location/scale)

Default: intercept is 0.