공지사항:
2025년 4월 15일 전에 Earth Engine 사용을 위해 등록된 모든 비상업용 프로젝트는 Earth Engine 액세스를 유지하기 위해
비상업용 자격 요건을 인증해야 합니다.
ee.ConfusionMatrix.order
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
행과 열의 이름과 순서를 반환합니다.
사용 | 반환 값 |
---|
ConfusionMatrix.order() | 목록 |
인수 | 유형 | 세부정보 |
---|
다음과 같은 경우: confusionMatrix | ConfusionMatrix | |
예
코드 편집기 (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 설정
Python API 및 geemap
를 사용한 대화형 개발에 관한 자세한 내용은
Python 환경 페이지를 참고하세요.
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())
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-07-26(UTC)
[null,null,["최종 업데이트: 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```"]]