Skip to content

Conversation

tswast
Copy link
Collaborator

@tswast tswast commented May 10, 2024

This aligns the Python code with the SQL at https://cloud.google.com/bigquery/docs/logistic-regression-prediction#create_a_logistic_regression_model

CREATE OR REPLACE MODEL
  `census.census_model`
OPTIONS
  ( model_type='LOGISTIC_REG',
    auto_class_weights=TRUE,
    data_split_method='NO_SPLIT',
    input_label_cols=['income_bracket'],
    max_iterations=15) AS
SELECT * EXCEPT(dataframe)
FROM
  `census.input_data`
WHERE
  dataframe = 'training'

🦕

…tion tutorial

This aligns the Python code with the SQL at https://cloud.google.com/bigquery/docs/logistic-regression-prediction#create_a_logistic_regression_model

```sql
CREATE OR REPLACE MODEL
  `census.census_model`
OPTIONS
  ( model_type='LOGISTIC_REG',
    auto_class_weights=TRUE,
    data_split_method='NO_SPLIT',
    input_label_cols=['income_bracket'],
    max_iterations=15) AS
SELECT * EXCEPT(dataframe)
FROM
  `census.input_data`
WHERE
  dataframe = 'training'
```
@tswast tswast requested review from a team as code owners May 10, 2024 16:00
@product-auto-label product-auto-label bot added size: s Pull request size is small. api: bigquery Issues related to the googleapis/python-bigquery-dataframes API. samples Issues that are directly related to samples. labels May 10, 2024
@tswast tswast changed the title docs: use class_weight="balanced" in the logistic regression predi… docs: use class_weight="balanced" in the logistic regression prediction tutorial May 10, 2024
@tswast tswast requested review from shobsi and removed request for junyazhang May 10, 2024 16:02
@tswast tswast requested review from GarrettWu and removed request for shobsi May 14, 2024 19:11
@tswast tswast assigned GarrettWu and unassigned shobsi May 14, 2024
@tswast tswast merged commit b951549 into main May 16, 2024
@tswast tswast deleted the tswast-patch-1 branch May 16, 2024 15:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigquery Issues related to the googleapis/python-bigquery-dataframes API. samples Issues that are directly related to samples. size: s Pull request size is small.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants