إشعار: يجب
إثبات أهلية جميع المشاريع غير التجارية المسجّلة لاستخدام Earth Engine قبل
15 أبريل 2025 من أجل الحفاظ على إمكانية الوصول إلى Earth Engine.
ee.Clusterer.wekaKMeans
تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
تجميع البيانات باستخدام خوارزمية k-means يمكن استخدام المسافة الإقليدية (الإعداد التلقائي) أو مسافة مانهاتن. في حال استخدام مسافة مانهاتن، يتم احتساب النقاط المركزية على أنّها الوسيط على مستوى المكوّن بدلاً من المتوسط. لمزيد من المعلومات، يُرجى الاطّلاع على:
د. آرثر، إس. Vassilvitskii: k-means++: the advantages of careful seeding. 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-means++، 2 = مظلة، 3 = الأبعد أولاً |
canopies | قيمة منطقية، القيمة التلقائية: false | استخدِم المظلات لتقليل عدد عمليات حساب المسافة. |
maxCandidates | عدد صحيح، القيمة التلقائية: 100 | الحد الأقصى لعدد مظلات المرشحين التي سيتم الاحتفاظ بها في الذاكرة في أي وقت عند استخدام تجميع المظلات سيحدّد مدى التباعد بين النقاط من النوع T2، بالإضافة إلى خصائص البيانات، عدد المظلات المرشّحة التي سيتم إنشاؤها قبل إجراء عمليات التقليم الدورية والنهائية، ما قد يؤدي إلى استهلاك مفرط للذاكرة. يساعد هذا الإعداد في تجنُّب استهلاك عدد كبير من مظلات المرشحين للذاكرة. |
periodicPruning | عدد صحيح، القيمة التلقائية: 10000 | تحديد عدد مرات تقليم الأغصان ذات الكثافة المنخفضة عند استخدام ميزة "تجميع الأغصان" |
minDensity | عدد صحيح، القيمة التلقائية: 2 | الحد الأدنى لكثافة المظلة عند استخدام التجميع حسب المظلة، والذي سيتم بموجبه تقليم المظلة أثناء التقليم الدوري |
t1 | التعويم، القيمة التلقائية: -1.5 | يشير ذلك إلى مسافة T1 المطلوب استخدامها عند استخدام التجميع المظلي. يتم اعتبار القيمة < 0 مضاعفًا موجبًا لـ T2. |
t2 | Float، القيمة التلقائية: -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. إنّ Java هي علامة تجارية مسجَّلة لشركة Oracle و/أو شركائها التابعين.
تاريخ التعديل الأخير: 2025-07-26 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-07-26 (حسب التوقيت العالمي المتفَّق عليه)"],[[["\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. |"]]