お知らせ:
2025 年 4 月 15 日より前に Earth Engine の使用を登録したすべての非商用プロジェクトは、Earth Engine へのアクセスを維持するために
非商用目的での利用資格を確認する必要があります。
ee.Clusterer.wekaKMeans
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
k 平均法アルゴリズムを使用してデータをクラスタ化します。ユークリッド距離(デフォルト)またはマンハッタン距離のいずれかを使用できます。マンハッタン距離を使用する場合、重心は平均ではなくコンポーネントごとの中央値として計算されます。詳細については、次をご覧ください。
D. Arthur, S. Vassilvitskii: k-means++: 慎重なシード処理の利点。In: Proceedings of the eighteenth annual ACM-SIAM symposium on Discrete algorithms, 1027-1035, 2007.
| 用途 | 戻り値 |
|---|
ee.Clusterer.wekaKMeans(nClusters, init, canopies, maxCandidates, periodicPruning, minDensity, t1, t2, distanceFunction, maxIterations, preserveOrder, fast, seed) | クラスタリング |
| 引数 | タイプ | 詳細 |
|---|
nClusters | Integer | クラスタの数。 |
init | 整数、デフォルト: 0 | 使用する初期化メソッド。0 = ランダム、1 = k-means++、2 = canopy、3 = farthest first。 |
canopies | ブール値。デフォルト値は false です。 | キャノピーを使用して、距離計算の回数を減らします。 |
maxCandidates | 整数、デフォルト: 100 | キャノピー クラスタリングを使用する場合に、一度にメモリに保持する候補キャノピーの最大数。T2 距離とデータ特性によって、定期的な剪定と最終的な剪定の前に形成される候補カノピーの数が決まります。これにより、メモリ消費量が過剰になる可能性があります。この設定により、多数の候補カノピーがメモリを消費することを回避できます。 |
periodicPruning | 整数、デフォルト: 10000 | キャノピー クラスタリングを使用する場合に、低密度のキャノピーを剪定する頻度。 |
minDensity | 整数、デフォルト: 2 | キャノピー クラスタリングを使用する場合の最小キャノピー密度。この密度を下回ると、定期的なプルーニング中にキャノピーがプルーニングされます。 |
t1 | 浮動小数点数、デフォルト: -1.5 | キャノピー クラスタリングを使用する場合に使用する T1 距離。0 より小さい値は、T2 の正の乗数として扱われます。 |
t2 | 浮動小数点数、デフォルト: -1 | キャノピー クラスタリングを使用する場合に使用する T2 距離。値が 0 未満の場合、属性の標準偏差に基づくヒューリスティックが使用されます。 |
distanceFunction | 文字列、デフォルト: "Euclidean" | 使用する距離関数。オプションは、ユークリッドとマンハッタンです。 |
maxIterations | 整数、デフォルト: null | 反復処理の最大数。 |
preserveOrder | ブール値。デフォルト値は false です。 | インスタンスの順序を保持します。 |
fast | ブール値。デフォルト値は false です。 | カットオフ値を使用して、距離の計算を高速化します。2 乗誤差/距離の計算/出力を無効にします。 |
seed | 整数、デフォルト: 10 | ランダム化シード。 |
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-07-26 UTC。
[null,null,["最終更新日 2025-07-26 UTC。"],[[["\u003cp\u003eClusters data using the k-means algorithm with either Euclidean (default) or Manhattan distance.\u003c/p\u003e\n"],["\u003cp\u003eIf Manhattan distance is selected, centroids are calculated using the component-wise median instead of the mean.\u003c/p\u003e\n"],["\u003cp\u003eOffers various initialization methods including random, k-means++, canopy, and farthest first.\u003c/p\u003e\n"],["\u003cp\u003eAllows customization of distance calculation, iteration limits, and performance optimization through parameters.\u003c/p\u003e\n"]]],["The k-means algorithm clusters data using either Euclidean or Manhattan distance. Manhattan distance uses component-wise median for centroids, while Euclidean uses the mean. Initialization methods include random, k-means++, canopy, and farthest first. Canopies can be used to optimize distance calculations. Parameters control the number of clusters, pruning frequency, density thresholds, and distance settings. Additional options include limiting iterations, preserving data order, and using a fast distance calculation mode.\n"],null,["# ee.Clusterer.wekaKMeans\n\nCluster data using the k-means algorithm. Can use either the Euclidean distance (default) or the Manhattan distance. If the Manhattan distance is used, then centroids are computed as the component-wise median rather than mean. For more information see:\n\n\u003cbr /\u003e\n\nD. Arthur, S. Vassilvitskii: k-means++: the advantages of careful seeding. In: Proceedings of the eighteenth annual ACM-SIAM symposium on Discrete algorithms, 1027-1035, 2007.\n\n| Usage | Returns |\n|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------|\n| `ee.Clusterer.wekaKMeans(nClusters, `*init* `, `*canopies* `, `*maxCandidates* `, `*periodicPruning* `, `*minDensity* `, `*t1* `, `*t2* `, `*distanceFunction* `, `*maxIterations* `, `*preserveOrder* `, `*fast* `, `*seed*`)` | Clusterer |\n\n| Argument | Type | Details |\n|--------------------|------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `nClusters` | Integer | Number of clusters. |\n| `init` | Integer, default: 0 | Initialization method to use. 0 = random, 1 = k-means++, 2 = canopy, 3 = farthest first. |\n| `canopies` | Boolean, default: false | Use canopies to reduce the number of distance calculations. |\n| `maxCandidates` | Integer, default: 100 | Maximum number of candidate canopies to retain in memory at any one time when using canopy clustering. T2 distance plus, data characteristics, will determine how many candidate canopies are formed before periodic and final pruning are performed, which might result in exceess memory consumption. This setting avoids large numbers of candidate canopies consuming memory. |\n| `periodicPruning` | Integer, default: 10000 | How often to prune low density canopies when using canopy clustering. |\n| `minDensity` | Integer, default: 2 | Minimum canopy density, when using canopy clustering, below which a canopy will be pruned during periodic pruning. |\n| `t1` | Float, default: -1.5 | The T1 distance to use when using canopy clustering. A value \\\u003c 0 is taken as a positive multiplier for T2. |\n| `t2` | Float, default: -1 | The T2 distance to use when using canopy clustering. Values \\\u003c 0 cause a heuristic based on attribute std. deviation to be used. |\n| `distanceFunction` | String, default: \"Euclidean\" | Distance function to use. Options are: Euclidean and Manhattan. |\n| `maxIterations` | Integer, default: null | Maximum number of iterations. |\n| `preserveOrder` | Boolean, default: false | Preserve order of instances. |\n| `fast` | Boolean, default: false | Enables faster distance calculations, using cut-off values. Disables the calculation/output of squared errors/distances. |\n| `seed` | Integer, default: 10 | The randomization seed. |"]]