Created
August 1, 2018 14:14
-
-
Save svenmueller/8d85f7930c38086b459e9742dcaac55f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#standardSQL | |
CREATE MODEL `bqml_tutorial.natality_model` | |
OPTIONS | |
(model_type='linear_reg', | |
input_label_cols=['weight_pounds']) AS | |
SELECT | |
weight_pounds, | |
is_male, | |
gestation_weeks, | |
mother_age, | |
CAST(mother_race AS string) AS mother_race | |
FROM | |
`bigquery-public-data.samples.natality` | |
WHERE | |
weight_pounds IS NOT NULL | |
AND RAND() < 0.001 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment