ee.ImageCollection.errorMatrix
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Tính toán ma trận lỗi 2D cho một tập hợp bằng cách so sánh hai cột của một tập hợp: một cột chứa các giá trị thực tế và một cột chứa các giá trị dự đoán. Các giá trị dự kiến là các số nguyên nhỏ liên tiếp, bắt đầu từ 0. Trục 0 (các hàng) của ma trận tương ứng với các giá trị thực tế và Trục 1 (các cột) tương ứng với các giá trị dự đoán.
Cách sử dụng | Giá trị trả về |
---|
ImageCollection.errorMatrix(actual, predicted, order) | ConfusionMatrix |
Đối số | Loại | Thông tin chi tiết |
---|
this: collection | FeatureCollection | Tập hợp đầu vào. |
actual | Chuỗi | Tên của thuộc tính chứa giá trị thực tế. |
predicted | Chuỗi | Tên của thuộc tính chứa giá trị được dự đoán. |
order | Danh sách, mặc định: null | Danh sách các giá trị dự kiến. Nếu bạn không chỉ định đối số này, các giá trị được giả định là liền kề và trải dài trong phạm vi từ 0 đến maxValue. Nếu được chỉ định, chỉ những giá trị khớp với danh sách này mới được dùng và ma trận sẽ có các phương diện và thứ tự khớp với danh sách này. |
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2025-07-26 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2025-07-26 UTC."],[[["\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. |"]]