공지사항:
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 | 정수 | 클러스터 수입니다. |
init | 정수, 기본값: 0 | 사용할 초기화 메서드입니다. 0 = 무작위, 1 = k-평균++, 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' | 사용할 거리 함수입니다. 옵션은 Euclidean과 Manhattan입니다. |
maxIterations | 정수, 기본값: null | 최대 반복 횟수 |
preserveOrder | 불리언, 기본값: false | 인스턴스 순서를 유지합니다. |
fast | 불리언, 기본값: false | 차단 값을 사용하여 더 빠른 거리 계산을 지원합니다. 제곱 오차/거리의 계산/출력을 사용 중지합니다. |
seed | 정수, 기본값: 10 | 무작위화 시드입니다. |
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 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. |"]]