Duyuru:
15 Nisan 2025'ten önce Earth Engine'i kullanmak için kaydedilen tüm ticari olmayan projelerin Earth Engine erişimini sürdürmek için
ticari olmayan uygunluğu doğrulaması gerekir.
ee.ConfusionMatrix.order
Koleksiyonlar ile düzeninizi koruyun
İçeriği tercihlerinize göre kaydedin ve kategorilere ayırın.
Matrisin satır ve sütunlarının adını ve sırasını döndürür.
Kullanım | İadeler |
---|
ConfusionMatrix.order() | Liste |
Bağımsız Değişken | Tür | Ayrıntılar |
---|
bu: confusionMatrix | ConfusionMatrix | |
Örnekler
Kod Düzenleyici (JavaScript)
// Construct an error/confusion matrix from an array (rows are actual values,
// columns are predicted values). We construct an error matrix here for brevity
// and matrix visualization, in most applications the confusion matrix will be
// generated from ee.Classifier.confusionMatrix.
var array = ee.Array([[32, 0, 0, 0, 1, 0],
[ 0, 5, 0, 0, 1, 0],
[ 0, 0, 1, 3, 0, 0],
[ 0, 1, 4, 26, 8, 0],
[ 0, 0, 0, 7, 15, 0],
[ 0, 0, 0, 1, 0, 5]]);
var cmDefaultOrder = ee.ConfusionMatrix(array);
print('Default name and order of the rows and columns',
cmDefaultOrder.order());
var order = [11, 22, 42, 52, 71, 81];
var cmSpecifiedOrder = ee.ConfusionMatrix({array: array, order: order});
print('Specified name and order of the rows and columns',
cmSpecifiedOrder.order());
Python kurulumu
Python API'si ve etkileşimli geliştirme için geemap
kullanımı hakkında bilgi edinmek üzere
Python Ortamı sayfasına bakın.
import ee
import geemap.core as geemap
Colab (Python)
# Construct an error/confusion matrix from an array (rows are actual values,
# columns are predicted values). We construct an error matrix here for brevity
# and matrix visualization, in most applications the confusion matrix will be
# generated from ee.Classifier.confusionMatrix.
array = ee.Array([[32, 0, 0, 0, 1, 0],
[ 0, 5, 0, 0, 1, 0],
[ 0, 0, 1, 3, 0, 0],
[ 0, 1, 4, 26, 8, 0],
[ 0, 0, 0, 7, 15, 0],
[ 0, 0, 0, 1, 0, 5]])
cm_default_order = ee.ConfusionMatrix(array)
print('Default name and order of the rows and columns:',
cm_default_order.order().getInfo())
order = [11, 22, 42, 52, 71, 81]
cm_specified_order = ee.ConfusionMatrix(array, order)
print('Specified name and order of the rows and columns:',
cm_specified_order.order().getInfo())
Aksi belirtilmediği sürece bu sayfanın içeriği Creative Commons Atıf 4.0 Lisansı altında ve kod örnekleri Apache 2.0 Lisansı altında lisanslanmıştır. Ayrıntılı bilgi için Google Developers Site Politikaları'na göz atın. Java, Oracle ve/veya satış ortaklarının tescilli ticari markasıdır.
Son güncelleme tarihi: 2025-07-26 UTC.
[null,null,["Son güncelleme tarihi: 2025-07-26 UTC."],[[["\u003cp\u003e\u003ccode\u003eConfusionMatrix.order()\u003c/code\u003e returns a list containing the names and order of rows and columns within the confusion matrix.\u003c/p\u003e\n"],["\u003cp\u003eBy default, \u003ccode\u003eConfusionMatrix\u003c/code\u003e automatically assigns an order to rows and columns if not explicitly specified.\u003c/p\u003e\n"],["\u003cp\u003eUsers can define a custom order for rows and columns when creating a \u003ccode\u003eConfusionMatrix\u003c/code\u003e using the \u003ccode\u003eorder\u003c/code\u003e parameter.\u003c/p\u003e\n"],["\u003cp\u003eThis function is crucial for understanding the structure and organization of a confusion matrix, especially when interpreting its values.\u003c/p\u003e\n"]]],["The `ConfusionMatrix.order()` method returns a list representing the name and order of the rows and columns within a confusion matrix. By default, this order is determined by the matrix's structure. Users can specify a custom order when creating the `ConfusionMatrix`, which will then be reflected in the output of `order()`. The examples illustrate how to retrieve both the default and a user-defined row and column order.\n"],null,["# ee.ConfusionMatrix.order\n\nReturns the name and order of the rows and columns of the matrix.\n\n\u003cbr /\u003e\n\n| Usage | Returns |\n|---------------------------|---------|\n| ConfusionMatrix.order`()` | List |\n\n| Argument | Type | Details |\n|-------------------------|-----------------|---------|\n| this: `confusionMatrix` | ConfusionMatrix | |\n\nExamples\n--------\n\n### Code Editor (JavaScript)\n\n```javascript\n// Construct an error/confusion matrix from an array (rows are actual values,\n// columns are predicted values). We construct an error matrix here for brevity\n// and matrix visualization, in most applications the confusion matrix will be\n// generated from ee.Classifier.confusionMatrix.\nvar array = ee.Array([[32, 0, 0, 0, 1, 0],\n [ 0, 5, 0, 0, 1, 0],\n [ 0, 0, 1, 3, 0, 0],\n [ 0, 1, 4, 26, 8, 0],\n [ 0, 0, 0, 7, 15, 0],\n [ 0, 0, 0, 1, 0, 5]]);\n\nvar cmDefaultOrder = ee.ConfusionMatrix(array);\nprint('Default name and order of the rows and columns',\n cmDefaultOrder.order());\n\nvar order = [11, 22, 42, 52, 71, 81];\nvar cmSpecifiedOrder = ee.ConfusionMatrix({array: array, order: order});\nprint('Specified name and order of the rows and columns',\n cmSpecifiedOrder.order());\n```\nPython setup\n\nSee the [Python Environment](/earth-engine/guides/python_install) page for information on the Python API and using\n`geemap` for interactive development. \n\n```python\nimport ee\nimport geemap.core as geemap\n```\n\n### Colab (Python)\n\n```python\n# Construct an error/confusion matrix from an array (rows are actual values,\n# columns are predicted values). We construct an error matrix here for brevity\n# and matrix visualization, in most applications the confusion matrix will be\n# generated from ee.Classifier.confusionMatrix.\narray = ee.Array([[32, 0, 0, 0, 1, 0],\n [ 0, 5, 0, 0, 1, 0],\n [ 0, 0, 1, 3, 0, 0],\n [ 0, 1, 4, 26, 8, 0],\n [ 0, 0, 0, 7, 15, 0],\n [ 0, 0, 0, 1, 0, 5]])\n\ncm_default_order = ee.ConfusionMatrix(array)\nprint('Default name and order of the rows and columns:',\n cm_default_order.order().getInfo())\n\norder = [11, 22, 42, 52, 71, 81]\ncm_specified_order = ee.ConfusionMatrix(array, order)\nprint('Specified name and order of the rows and columns:',\n cm_specified_order.order().getInfo())\n```"]]