[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["難以理解","hardToUnderstand","thumb-down"],["資訊或程式碼範例有誤","incorrectInformationOrSampleCode","thumb-down"],["缺少我需要的資訊/範例","missingTheInformationSamplesINeed","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-09-04 (世界標準時間)。"],[[["\u003cp\u003eContribution analysis, also known as key driver analysis, helps identify changes in key metrics across multi-dimensional data.\u003c/p\u003e\n"],["\u003cp\u003eThis feature, currently in a pre-GA stage, is available "as is" with potential limited support, and subject to the "Pre-GA Offerings Terms".\u003c/p\u003e\n"],["\u003cp\u003eContribution analysis models compare a test data set to a control data set to identify statistically significant changes across various dimensions, such as time or location.\u003c/p\u003e\n"],["\u003cp\u003eA \u003ccode\u003eCREATE MODEL\u003c/code\u003e statement in BigQuery can be used to build a contribution analysis model, and these models can use either summable or summable ratio metrics.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eML.GET_INSIGHTS\u003c/code\u003e function allows users to retrieve metric information calculated by a created contribution analysis model.\u003c/p\u003e\n"]]],[],null,["# Contribution analysis overview\n==============================\n\nUse this document to understand the contribution analysis use case,\nand the options for performing contribution analysis in BigQuery ML.\n\nWhat is contribution analysis?\n------------------------------\n\nContribution analysis, also called key driver analysis, is a method used to\ngenerate insights about changes to key metrics in your multi-dimensional data.\nFor example, you can use contribution analysis to see what data contributed to a\nchange in revenue numbers across two quarters, or to compare two sets of\ntraining data to understand changes in an ML model's performance.\n\nContribution analysis is a form of\n[augmented analytics](https://en.wikipedia.org/wiki/Augmented_Analytics),\nwhich is the use of artificial intelligence (AI) to enhance and automate the\nanalysis and understanding of data. Contribution analysis accomplishes one of\nthe key goals of augmented analytics, which is to help users find patterns in\ntheir data.\n\nContribution analysis with BigQuery ML\n--------------------------------------\n\nTo use contribution analysis in BigQuery ML, create a\ncontribution analysis model with the\n[`CREATE MODEL` statement](/bigquery/docs/reference/standard-sql/bigqueryml-syntax-create-contribution-analysis).\n\nA contribution analysis model detects segments of data that show changes in\na given metric by comparing a test set of data to a control set of data. For\nexample, you might use a [table snapshot](/bigquery/docs/table-snapshots-intro)\nof sales data taken at the end of 2023 as your test data and a table snapshot\ntaken at the end of 2022 as your control data, and compare them to see how\nyour sales changed over time. A contribution analysis model could show you\nwhich segment of data, such as online customers in a particular region, drove\nthe biggest change in sales from one year to the next.\n\nA *metric* is the numerical value that contribution analysis models use\nto measure and compare the changes between the test and control data. You can\nspecify the following types of metrics with a contribution analysis model:\n\n- [*Summable*](/bigquery/docs/reference/standard-sql/bigqueryml-syntax-create-contribution-analysis#use_a_summable_metric): sums the values of a metric column that you specify, and then determines a total for each segment of the data.\n- [*Summable ratio*](/bigquery/docs/reference/standard-sql/bigqueryml-syntax-create-contribution-analysis#use_a_summable_ratio_metric): sums the values of two numeric columns that you specify, and determines the ratio between them for each segment of the data.\n- [*Summable by category*](/bigquery/docs/reference/standard-sql/bigqueryml-syntax-create-contribution-analysis#use_a_summable_by_category_metric): sums the value of a numeric column and divides it by the number of distinct values from a categorical column.\n\nA *segment* is a slice of the data identified by a given combination of\ndimension values. For example, for a contribution analysis model based on the\n`store_number`, `customer_id`, and `day` dimensions, every unique combination of\nthose dimension values represents a segment. In the following table, each row\nrepresents a different segment:\n\nTo reduce model creation time, specify an\n[apriori support threshold](/bigquery/docs/reference/standard-sql/bigqueryml-syntax-create-contribution-analysis#use_an_apriori_support_threshold).\nAn apriori support threshold lets you prune small and less relevant segments\nso that the model uses only the largest and most relevant segments.\n\nAfter you have created a contribution analysis model, you can use the\n[`ML.GET_INSIGHTS` function](/bigquery/docs/reference/standard-sql/bigqueryml-syntax-get-insights)\nto retrieve the metric information calculated by the model. The model output\nconsists of rows of insights, where each insight corresponds to a segment and\nprovides the segment's corresponding metrics.\n\nWhat's next\n-----------\n\n- [Create a contribution analysis model](/bigquery/docs/reference/standard-sql/bigqueryml-syntax-create-contribution-analysis)\n- [Get data insights from a contribution analysis model](/bigquery/docs/get-contribution-analysis-insights)"]]