このページの一部またはすべての情報は、S3NS の Trusted Cloud に適用されない場合があります。
分類の概要
ML の一般的なユースケースは、類似のラベル付きデータでトレーニングされたモデルを使用して新しいデータを分類することです。たとえば、メールがスパムかどうかや、お客様の製品レビューが肯定的、否定的、中立的のいずれなのかを予測できます。
次のいずれかのモデルを ML.PREDICT
関数と組み合わせて使用し、分類を行うことができます。
推奨される知識
CREATE MODEL
ステートメントと ML.PREDICT
関数のデフォルト設定を使用すると、ML の知識がなくても分類モデルを作成して使用できます。ただし、ML 開発に関する基本的な知識があれば、データとモデルの両方を最適化して、より良い結果を得ることができます。ML の手法とプロセスに習熟するために、次のリソースの活用をおすすめします。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-08-17 UTC。
[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["必要な情報がない","missingTheInformationINeed","thumb-down"],["複雑すぎる / 手順が多すぎる","tooComplicatedTooManySteps","thumb-down"],["最新ではない","outOfDate","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["サンプル / コードに問題がある","samplesCodeIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2025-08-17 UTC。"],[[["\u003cp\u003eMachine learning classification involves using a model trained on labeled data to classify new data, such as identifying spam emails or categorizing customer reviews.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eML.PREDICT\u003c/code\u003e function can be used with various classification models, including logistic regression, boosted tree, random forest, deep neural network (DNN), wide & deep, and AutoML models.\u003c/p\u003e\n"],["\u003cp\u003eDifferent models can be specified using the \u003ccode\u003eMODEL_TYPE\u003c/code\u003e option, such as \u003ccode\u003eLOGISTIC_REG\u003c/code\u003e, \u003ccode\u003eBOOSTED_TREE_CLASSIFIER\u003c/code\u003e, \u003ccode\u003eRANDOM_FOREST_CLASSIFIER\u003c/code\u003e, \u003ccode\u003eDNN_CLASSIFIER\u003c/code\u003e, \u003ccode\u003eDNN_LINEAR_COMBINED_CLASSIFIER\u003c/code\u003e, and \u003ccode\u003eAUTOML_CLASSIFIER\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eWhile classification models can be created and used without extensive ML knowledge, understanding the basics can help optimize both data and the model for better results.\u003c/p\u003e\n"],["\u003cp\u003eResources like the Machine Learning Crash Course, Intro to Machine Learning, and Intermediate Machine Learning are recommended for gaining familiarity with machine learning techniques.\u003c/p\u003e\n"]]],[],null,["# Classification overview\n=======================\n\nA common use case for machine learning is classifying new data by using a model\ntrained on similar labeled data. For example, you might want to predict whether\nan email is spam, or whether a customer product review is positive, negative, or\nneutral.\n\nYou can use any of the following models in combination with the\n[`ML.PREDICT` function](/bigquery/docs/reference/standard-sql/bigqueryml-syntax-predict)\nto perform classification:\n\n- [Logistic regression models](/bigquery/docs/reference/standard-sql/bigqueryml-syntax-create-glm): use [logistic regression](https://developers.google.com/machine-learning/crash-course/logistic-regression) by setting the `MODEL_TYPE` option to `LOGISTIC_REG`.\n- [Boosted tree models](/bigquery/docs/reference/standard-sql/bigqueryml-syntax-create-boosted-tree): use a [gradient boosted decision tree](https://developers.google.com/machine-learning/decision-forests/intro-to-gbdt) by setting the `MODEL_TYPE` option to `BOOSTED_TREE_CLASSIFIER`.\n- [Random forest models](/bigquery/docs/reference/standard-sql/bigqueryml-syntax-create-random-forest): use a [random forest](https://developers.google.com/machine-learning/decision-forests/intro-to-decision-forests) by setting the `MODEL_TYPE` option to `RANDOM_FOREST_CLASSIFIER`.\n- [Deep neural network (DNN) models](/bigquery/docs/reference/standard-sql/bigqueryml-syntax-create-dnn-models): use a [neural network](https://developers.google.com/machine-learning/crash-course/neural-networks) by setting the `MODEL_TYPE` option to `DNN_CLASSIFIER`.\n- [Wide \\& Deep models](/bigquery/docs/reference/standard-sql/bigqueryml-syntax-create-wnd-models): use [wide \\& deep learning](https://dl.acm.org/doi/10.1145/2988450.2988454) by setting the `MODEL_TYPE` option to `DNN_LINEAR_COMBINED_CLASSIFIER`.\n- [AutoML models](/bigquery/docs/reference/standard-sql/bigqueryml-syntax-create-automl): use an [AutoML classification model](/vertex-ai/docs/tabular-data/classification-regression/overview) by setting the `MODEL_TYPE` option to `AUTOML_CLASSIFIER`.\n\nRecommended knowledge\n---------------------\n\nBy using the default settings in the `CREATE MODEL` statements and the\n`ML.PREDICT` function, you can create and use a classification model even\nwithout much ML knowledge. However, having basic knowledge about\nML development helps you optimize both your data and your model to\ndeliver better results. We recommend using the following resources to develop\nfamiliarity with ML techniques and processes:\n\n- [Machine Learning Crash Course](https://developers.google.com/machine-learning/crash-course)\n- [Intro to Machine Learning](https://www.kaggle.com/learn/intro-to-machine-learning)\n- [Intermediate Machine Learning](https://www.kaggle.com/learn/intermediate-machine-learning)"]]