公告:凡是在
2025 年 4 月 15 日前註冊使用 Earth Engine 的非商業專案,都必須
驗證非商業用途資格,才能繼續存取 Earth Engine。
ee.ImageCollection.errorMatrix
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
比較集合的兩個資料欄,計算集合的 2D 錯誤矩陣:一個資料欄包含實際值,另一個資料欄包含預測值。這些值應為從 0 開始的連續整數。矩陣的軸 0 (資料列) 對應實際值,軸 1 (資料欄) 則對應預測值。
用量 | 傳回 |
---|
ImageCollection.errorMatrix(actual, predicted, order) | ConfusionMatrix |
引數 | 類型 | 詳細資料 |
---|
這個:collection | FeatureCollection | 輸入集合。 |
actual | 字串 | 包含實際值的屬性名稱。 |
predicted | 字串 | 包含預測值的屬性名稱。 |
order | 清單,預設值為空值 | 預期值清單。如未指定這個引數,系統會假設值是連續的,且範圍介於 0 到 maxValue 之間。如果指定,系統只會使用符合這個清單的值,且矩陣的維度和順序會與這個清單相符。 |
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-26 (世界標準時間)。
[null,null,["上次更新時間: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. |"]]