TD_BinCodeFit Syntax Elements - Teradata® Database

Database Analytic Functions

Product
Teradata® Database
Release Number
17.10
Published
July 2021
Language
English (United States)
Last Update
2021-07-28
dita:mapPath
Teradata_Vantage™___Advanced_SQL_Engine_Analytic_Functions.withLogo_upload_July2021/wnd1589838592459.ditamap
dita:ditavalPath
Teradata_Vantage™___Advanced_SQL_Engine_Analytic_Functions.withLogo_upload_July2021/ayr1485454803741.ditaval
dita:id
B035-1206
lifecycle
previous
Product Category
Teradata Vantage™
OutputTable
[MethodType ('equal-width') only.] [Optional] Specify a name for the secondary output table which contains the actual bins used by the BincodeTransform function.
TargetColumns
Specify the names of the InputTable columns to bin-code.
The maximum number of target columns is 2018.
MethodType
Specify the bin-coding method:
Method Type Description
equal-width Bins have fixed width with auto-generated labels.

Function finds minimum and maximum values of target columns (min and max) and computes bin width, w, with this formula:

w = (max - min)/k

k, the number of bins, is determined by NBins.

For bin boundaries and names of generated labels, see LabelPrefix.

variable-width Bins have specified variable widths and specified labels, provided by FitInput table.

Maximum number of bins is 3000.

NBins
[MethodType ('equal-width') only.] Specify either a single bin value for all the target columns or separate bin values for each of the target columns.
LabelPrefix
[MethodType ('equal-width') only.][Optional] Specify either a prefix for all the target columns or a separate prefix for each of the target columns.
Lower Bin Boundary Upper Bin Boundary prefix-Generated Bin Label prefix_count-Generated Bin Label
min min + w prefix_1 target_column_1
min + w min + 2w prefix_2 target_column_2
... ... ... ...
min + k w min + (k - 1)w prefix_k target_column_k
Default: Target column name is used as the prefix
MinValueColumn
[MethodType ('variable-width') only.][Optional] Specify the name of the FitInput column that has the minimum value of the bin (lower bin boundaries).
Default: MinValue
MaxValueColumn
[MethodType ('variable-width') only.][Optional] Specify the name of the FitInput column that has the maximum value of the bin (upper bin boundaries).
Default: MaxValue
LabelColumn
[MethodType ('variable-width') only.][Optional] Specify the name of the FitInput column that has the bin labels.
Default: Label
TargetColNames
[MethodType ('variable-width') only.][Optional] Specify the name of the FitInput column that has the target column names.
Column range is not supported