NORMALIZE
Runs a normalization algorithm on an input table or view. The output is a view with the normalized data.
Important: Before using a machine learning function, be aware that all the ongoing transactions might be committed.
Syntax
NORMALIZE ( 'output_view', 'input_relation', 'input_columns', 'normalization_method'
[ USING PARAMETERS [exclude_columns= 'col1, col2, ... coln '] ]
Arguments
output_view |
The name of the View where you save the normalized data from the chosen |
input_relation |
The table or view that contains the data to be normalized. |
input_columns |
A comma-separated list of the columns in the To include all of the columns from the input_relation, specify this argument as a wildcard (*). |
normalization_method |
The normalization method to use. Valid Values:
If infinity values appear in the table, the method ignores those values. |
Parameters
exclude_columns=col1, col2, ... coln |
(Optional) The columns from |
Privileges
To use NORMALIZE, you must either be a superuser or have CREATE privileges for the schema of the output view and SELECT privileges for the input table or view.
See GRANT (Schema) and GRANT (Table).
Examples
These examples show how you can use the NORMALIZE function on the wt
and hp
columns in the mtcars table.
Execute the NORMALIZE function, and specify the minmax
method:
=> SELECT NORMALIZE('mtcars_norm', 'mtcars', 'wt, hp', 'minmax'); NORMALIZE -------------------------- Finished in 1 iteration (1 row)
Execute the NORMALIZE function, and specify the zscore
method:
=> SELECT NORMALIZE('mtcars_normz','mtcars', 'wt, hp', 'zscore'); NORMALIZE -------------------------- Finished in 1 iteration (1 row)
Execute the NORMALIZE function, and specify the robust_zscore
method:
=> SELECT NORMALIZE('mtcars_normz', 'mtcars', 'wt, hp', 'robust_zscore'); NORMALIZE -------------------------- Finished in 1 iteration (1 row)