公告:所有在
2025 年 4 月 15 日之前注册使用 Earth Engine 的非商业项目都必须
验证是否符合非商业性质的资格条件,才能继续使用 Earth Engine。
ee.ImageCollection.errorMatrix
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
通过比较集合的两个列(一个包含实际值,另一个包含预测值)来计算集合的二维误差矩阵。这些值应是从 0 开始的连续小整数。矩阵的轴 0(行)对应于实际值,轴 1(列)对应于预测值。
用法 | 返回 |
---|
ImageCollection.errorMatrix(actual, predicted, order) | ConfusionMatrix |
参数 | 类型 | 详细信息 |
---|
此:collection | FeatureCollection | 输入集合。 |
actual | 字符串 | 包含实际值的属性的名称。 |
predicted | 字符串 | 包含预测值的属性的名称。 |
order | 列表,默认值:null | 预期值列表。如果未指定此实参,则假定这些值是连续的,并且范围为 0 到 maxValue。如果指定,则仅使用与此列表匹配的值,并且矩阵的维度和顺序将与此列表匹配。 |
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-26。
[null,null,["最后更新时间 (UTC):2025-07-26。"],[[["\u003cp\u003eComputes a 2D error matrix (confusion matrix) by comparing actual and predicted values within a collection.\u003c/p\u003e\n"],["\u003cp\u003eThe matrix is structured with actual values on rows and predicted values on columns, assuming small contiguous integers starting from 0 for both.\u003c/p\u003e\n"],["\u003cp\u003eUsers specify the properties holding actual and predicted values, and optionally, a list of expected values to customize the matrix structure.\u003c/p\u003e\n"]]],["The `errorMatrix` method computes a 2D error matrix (ConfusionMatrix) from a FeatureCollection. It compares 'actual' and 'predicted' value columns. Rows represent actual values, columns represent predicted values. Input values are small, contiguous integers starting from 0. An optional 'order' list defines the expected values, dictating matrix dimensions and order. If 'order' is unspecified values are assumed to be contiguous from 0 to a maximum value. The input collection is a FeatureCollection.\n"],null,["# ee.ImageCollection.errorMatrix\n\nComputes a 2D error matrix for a collection by comparing two columns of a collection: one containing the actual values, and one containing predicted values. The values are expected to be small contiguous integers, starting from 0. Axis 0 (the rows) of the matrix correspond to the actual values, and Axis 1 (the columns) to the predicted values.\n\n\u003cbr /\u003e\n\n| Usage | Returns |\n|-------------------------------------------------------------|-----------------|\n| ImageCollection.errorMatrix`(actual, predicted, `*order*`)` | ConfusionMatrix |\n\n| Argument | Type | Details |\n|--------------------|---------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| this: `collection` | FeatureCollection | The input collection. |\n| `actual` | String | The name of the property containing the actual value. |\n| `predicted` | String | The name of the property containing the predicted value. |\n| `order` | List, default: null | A list of the expected values. If this argument is not specified, the values are assumed to be contiguous and span the range 0 to maxValue. If specified, only values matching this list are used, and the matrix will have dimensions and order matching this list. |"]]