Skip to content

Instantly share code, notes, and snippets.

@orcaman
Last active June 26, 2019 19:59
Show Gist options
  • Save orcaman/a6a80457ceb481c1672c05f2ac5de759 to your computer and use it in GitHub Desktop.
Save orcaman/a6a80457ceb481c1672c05f2ac5de759 to your computer and use it in GitHub Desktop.
K-Means CREATE OR REPLACE MODEL
CREATE OR REPLACE MODEL
 public.iris_clusters
OPTIONS
 (model_type='kmeans',
num_clusters=4,
 standardize_features = TRUE) AS
SELECT
 DISTINCT sepal_length,
 sepal_width,
 petal_length,
 petal_width,
 species
FROM
 `public.iris`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment