このページの一部またはすべての情報は、S3NS の Trusted Cloud に適用されない場合があります。 詳細については、
Google Cloud との違いをご覧ください。
クラスタリングの概要
クラスタリングは、類似したレコードをグループ化するために使用できる教師なし ML 手法です。これは、データにどのようなグループやクラスタがあるかを把握する必要があるものの、モデルをトレーニングするためのラベル付きデータがない場合に活用できるアプローチです。たとえば、地下鉄のチケット購入に関するラベルなしデータがある場合、そのデータをチケット購入時間別にクラスタリングすると、地下鉄の利用が最も多い時間帯を把握できます。詳細については、クラスタリングとはをご覧ください。
クラスタリングには K 平均法モデルが広く使用されています。k 平均法モデルを ML.PREDICT
関数で使用してデータをクラスタリング、または ML.DETECT_ANOMALIES
関数で異常検出を実行できます。
K 平均法モデルは、重心ベースのクラスタリングを使用してデータをクラスタに編成します。K 平均法モデルの重心に関する情報を取得するには、ML.CENTROIDS
関数を使用します。
推奨される知識
CREATE MODEL
ステートメントと推論関数をデフォルト設定にすると、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\u003eClustering is an unsupervised machine learning technique that groups similar records together, useful for understanding data patterns without labeled training data.\u003c/p\u003e\n"],["\u003cp\u003eK-means models, a widely used clustering method, can be used with \u003ccode\u003eML.PREDICT\u003c/code\u003e to cluster data or with \u003ccode\u003eML.DETECT_ANOMALIES\u003c/code\u003e for anomaly detection.\u003c/p\u003e\n"],["\u003cp\u003eK-means models utilize centroid-based clustering, and information about a model's centroids can be obtained using the \u003ccode\u003eML.CENTROIDS\u003c/code\u003e function.\u003c/p\u003e\n"],["\u003cp\u003eWhile you can create and use clustering models with default settings without extensive machine learning knowledge, basic familiarity with ML and clustering models can improve results.\u003c/p\u003e\n"]]],[],null,["# Clustering overview\n===================\n\nClustering is an unsupervised machine learning technique you can use to group\nsimilar records together. It is a useful approach for when you want to\nunderstand what groups or clusters you have in your data, but don't have\nlabeled data to train a model on. For example, if you had unlabeled data about\nsubway ticket purchases, you could cluster that data by ticket purchase time to\nbetter understand what time periods have the heaviest subway usage. For more\ninformation, see\n[What is clustering?](https://developers.google.com/machine-learning/clustering/overview)\n\n[K-means models](/bigquery/docs/reference/standard-sql/bigqueryml-syntax-create-kmeans)\nare widely used to perform clustering. You can use k-means models with the\n[`ML.PREDICT` function](/bigquery/docs/reference/standard-sql/bigqueryml-syntax-predict)\nto cluster data, or with the\n[`ML.DETECT_ANOMALIES` function](/bigquery/docs/reference/standard-sql/bigqueryml-syntax-detect-anomalies)\nto perform [anomaly detection](/bigquery/docs/anomaly-detection-overview).\n\nK-means models use\n[centroid-based clustering](https://developers.google.com/machine-learning/clustering/clustering-algorithms#centroid-based_clustering) to organize data into clusters.\nTo get information about a k-mean model's centroids, you can use the\n[`ML.CENTROIDS` function](/bigquery/docs/reference/standard-sql/bigqueryml-syntax-centroids).\n\nRecommended knowledge\n---------------------\n\nBy using the default settings in the `CREATE MODEL` statements and the\ninference functions, you can create and use a clustering model even\nwithout much ML knowledge. However, having basic knowledge about\nML development, and clustering models in particular,\nhelps 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)\n- [Clustering](https://developers.google.com/machine-learning/clustering)"]]