[ Web Proxy ]
URL:
Viewing: https://cloud.google.com/bigquery/docs/reference/standard-sql/bigqueryml-syntax-importance [Back]  [Original]

The ML.FEATURE_IMPORTANCE function  |  BigQuery  |  Google Cloud Documentation Skip to main content
Google Cloud Documentation [Google Cloud Documentation]
Send feedback Stay organized with collections Save and categorize content based on your preferences.

The ML.FEATURE_IMPORTANCE function

This document describes the ML.FEATURE_IMPORTANCE function, which lets you see the feature importance score. This score indicates how useful or valuable each feature was in the construction of a boosted tree or a random forest model during training. For more information, see the feature_importances property in the XGBoost library.

Syntax

ML.FEATURE_IMPORTANCE(
  MODEL `PROJECT_ID.DATASET.MODEL`
)

Arguments

ML.FEATURE_IMPORTANCE takes the following arguments:

Output

ML.FEATURE_IMPORTANCE returns the following columns:

If the TRANSFORM clause was used in the CREATE MODEL statement that created the model, ML.FEATURE_IMPORTANCE returns the information of the pre-transform columns from the query_statement clause of the CREATE MODEL statement.

Permissions

You must have the bigquery.models.create and bigquery.models.getData Identity and Access Management (IAM) permissions in order to run ML.FEATURE_IMPORTANCE.

Limitations

ML.FEATURE_IMPORTANCE is only supported with boosted tree models and random forest models.

Example

This example retrieves feature importance from mymodel in mydataset. The dataset is in your default project.

SELECT
  *
FROM
  ML.FEATURE_IMPORTANCE(MODEL `mydataset.mymodel`)

What's next

Send feedback

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 2026-08-11 UTC.

Need to tell us more? [[["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 2026-08-11 UTC."],[],[]]

Web Proxy Viewer  |  New URL  |  Original Page