Stay organized with collections Save and categorize content based on your preferences.
The ML.RECONSTRUCTION_LOSS functionThis document describes the ML.RECONSTRUCTION_LOSS
function, which you can use to compute the reconstruction losses between the input and output data of an autoencoder model.
ML.RECONSTRUCTION_LOSS( MODEL `PROJECT_ID.DATASET.MODEL_NAME`, { TABLE `PROJECT_ID.DATASET.TABLE` | (QUERY_STATEMENT) } )Arguments
ML.RECONSTRUCTION_LOSS
takes the following arguments:
PROJECT_ID
: the project that contains the resource.DATASET
: the dataset that contains the resource.MODEL
: the name of the model.TABLE
: the name of the input data table.
If you specify TABLE
, the input column names in the table must match the column names in the model, and their types must be compatible according to BigQuery implicit coercion rules.
QUERY_STATEMENT
: the GoogleSQL query to use for input data to generate the reconstruction losses. For the supported SQL syntax of the QUERY_STATEMENT
clause in GoogleSQL, see Query syntax.
If you specify QUERY_STATEMENT
, the input column names from the query must match the column names in the model, and their types must be compatible according to BigQuery implicit coercion rules.
If you used the TRANSFORM
clause in the CREATE MODEL
statement that created the model, then you can only use the input columns present in the TRANSFORM
clause in the QUERY_STATEMENT
.
ML.RECONSTRUCTION_LOSS
returns the following columns:
mean_absolute_error
: a FLOAT64
value that contains the mean absolute error for the model.mean_squared_error
: a FLOAT64
value that contains the mean squared error for the model.mean_squared_log_error
: a FLOAT64
value that contains the mean squared log error for the model.ML.RECONSTRUCTION_LOSS
doesn't support imported TensorFlow models.
The following query computes reconstruction losses for the model mydataset.mymodel
in your default project:
SELECT * FROM ML.RECONSTRUCTION_LOSS( MODEL `mydataset.mymodel`, (SELECT column1, column2, column3, column4 FROM `mydataset.mytable`) )What's next
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-07 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["The `ML.RECONSTRUCTION_LOSS` function computes the reconstruction losses between input and output data of an autoencoder model in BigQuery ML."],["This function accepts a model name and either a table or a query statement as input to generate reconstruction losses."],["Input column names and types must match the model's structure and adhere to BigQuery's implicit coercion rules when specifying either a table or a query statement."],["The output of `ML.RECONSTRUCTION_LOSS` includes `mean_absolute_error`, `mean_squared_error`, and `mean_squared_log_error`, all of which are `FLOAT64` values."],["`ML.RECONSTRUCTION_LOSS` is not compatible with imported TensorFlow models."]]],[]]
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4