TD_Silhouette InputTable
id clusterid c1 c2 -- --------- -- -- 1 1 1 1 2 1 2 2 3 2 8 8 4 2 9 9
Example: TD_Silhouette Call Using SCORE
SELECT * FROM TD_Silhouette( ON input_tbl as InputTable USING IdColumn('id') ClusterIdColumn('clusterid') TargetColumns('c1','c2') OutputType('SCORE') ) as dt;
TD_Silhouette Output Using SCORE
silhouette_score ---------------- 0.856410256
Example: TD_Silhouette Call Using SAMPLE_SCORES
SELECT * FROM TD_Silhouette( ON input_tbl as InputTable USING IdColumn('id') ClusterIdColumn('clusterid') TargetColumns('c1','c2') OutputType('SAMPLE_SCORES') ) as dt;
TD_Silhouette Output Using SAMPLE_SCORES
id clusterid a_i b_i silhouette_score -- --------- ----------- ------------ ---------------- 1 1 1.414213562 10.606601718 0.866666667 4 2 1.414213562 10.606601718 0.866666667 3 2 1.414213562 9.192388155 0.846153846 2 1 1.414213562 9.192388155 0.846153846
Example: TD_Silhouette Call Using CLUSTER_SCORES
Output when OutputType is set to CLUSTER_SCORES.
SELECT * FROM TD_Silhouette( ON input_tbl as InputTable USING IdColumn('id') ClusterIdColumn('clusterid') TargetColumns('c1','c2') OutputType('CLUSTER_SCORES') ) as dt;
TD_Silhouette Output Using CLUSTER_SCORES
clusterid silhouette_score --------- ---------------- 1 0.856410256 2 0.856410256
Example: TD_Silhouette Using TargetColumns and SCORE
SELECT * FROM TD_Silhouette( ON input_tbl as InputTable USING IdColumn('id') ClusterIdColumn('clusterid') TargetColumns('[2:3]') OutputType('SCORE') ) as dt;