kristeligt-dagblad / dbt_ml

Package for dbt that allows users to train, audit and use BigQuery ML models.
Apache License 2.0
64 stars 26 forks source link

BUG Logic Regression multiclass models #57

Open alexmgncurve opened 4 months ago

alexmgncurve commented 4 months ago

Our model audit post hook is failing recently. As far as I can tell, Bigquery ML Add a column "class_label" when using the ML.WEIGHTS function.

class_label: a STRING value that contains the label for a given weight. Only used for multiclass models. The output includes one row per <class_label, processed_input> combination

By the look of it, the package does not take this into account

https://cloud.google.com/bigquery/docs/reference/standard-sql/bigqueryml-syntax-weights

https://github.com/kristeligt-dagblad/dbt_ml/blob/f7001ad805500b2f87e1d71cc9f26ace8d1a4c3e/macros/hooks/model_audit.sql#L93