- input_table
- [Optional] init_params
Column Name | Data Type | Description |
---|---|---|
id | Any | Leftmost column, which identifies the data point. |
dim_n | SQL numeric data type | The table has one such column for each dimension (n has the values 1 through D). |
You can specify initial values for the weight, mean, and covariance of each cluster using the optional init_params table. If you want the function to automatically determine the initial values, you must use the clauseON (SELECT 1) AS init_params. Do not provide an empty table for init_params, or the function terminates without executing and produces no output table.
Column Name | Data Type | Description |
---|---|---|
weight | SQL numeric data type | Initial weight of the cluster. If you do not specify this value, then the function gives all clusters the same initial weight. |
dim_n | SQL numeric data type | Initial mean of the cluster. If you do not specify this value, then the function selects the initial means from a multivariate standard normal distributed centered at the origin. The table has one such column for each dimension (n has the values 1 through D). |
covariance | VARCHAR | Initial covariance of the cluster. Possible values depend on CovarianceType: 'spherical': Positive numeric value (for example, 1.0.) 'diagonal': JSON representation of a DOUBLE PRECISION array (for example, [1.0,2.0,3.0,4.0]) 'tied' or 'full': JSON representation of a two-dimensional DOUBLE PRECISION array (for example, [[1.0,2.0],[2.0,4.0]]) If you do not specify this value, then the function assigns each cluster an initial covariance matrix equal to the covariance matrix. |