Thông báo : Tất cả dự án phi thương mại đã đăng ký sử dụng Earth Engine trước
ngày 15 tháng 4 năm 2025 phải
xác minh điều kiện sử dụng phi thương mại để duy trì quyền truy cập. Nếu bạn chưa xác minh trước ngày 26 tháng 9 năm 2025, quyền truy cập của bạn có thể bị tạm ngưng.
Gửi ý kiến phản hồi
ee.ConfusionMatrix.producersAccuracy
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 độ chính xác của nhà sản xuất trong ma trận nhầm lẫn được xác định là (số lượng đúng / tổng số) cho từng cột.
Cách sử dụng Giá trị trả về ConfusionMatrix. producersAccuracy ()
Mảng
Đối số Loại Thông tin chi tiết this: confusionMatrix
ConfusionMatrix
Ví dụ
Trình soạn thảo mã (JavaScript)
// Construct a confusion matrix from an array (rows are actual values,
// columns are predicted values). We construct a confusion matrix here for
// brevity and clear 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 confusionMatrix = ee . ConfusionMatrix ( array );
print ( "Constructed confusion matrix" , confusionMatrix );
// Calculate overall accuracy.
print ( "Overall accuracy" , confusionMatrix . accuracy ());
// Calculate consumer's accuracy, also known as user's accuracy or
// specificity and the complement of commission error (1 − commission error).
print ( "Consumer's accuracy" , confusionMatrix . consumersAccuracy ());
// Calculate producer's accuracy, also known as sensitivity and the
// compliment of omission error (1 − omission error).
print ( "Producer's accuracy" , confusionMatrix . producersAccuracy ());
// Calculate kappa statistic.
print ( 'Kappa statistic' , confusionMatrix . kappa ());
Thiết lập Python
Hãy xem trang
Môi trường Python để biết thông tin về API Python và cách sử dụng geemap
cho quá trình phát triển tương tác.
import ee
import geemap.core as geemap
Colab (Python)
from pprint import pprint
# Construct a confusion matrix from an array (rows are actual values,
# columns are predicted values). We construct a confusion matrix here for
# brevity and clear 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 ]])
confusion_matrix = ee . ConfusionMatrix ( array )
print ( "Constructed confusion matrix:" )
pprint ( confusion_matrix . getInfo ())
# Calculate overall accuracy.
print ( "Overall accuracy:" , confusion_matrix . accuracy () . getInfo ())
# Calculate consumer's accuracy, also known as user's accuracy or
# specificity and the complement of commission error (1 − commission error).
print ( "Consumer's accuracy:" )
pprint ( confusion_matrix . consumersAccuracy () . getInfo ())
# Calculate producer's accuracy, also known as sensitivity and the
# compliment of omission error (1 − omission error).
print ( "Producer's accuracy:" )
pprint ( confusion_matrix . producersAccuracy () . getInfo ())
# Calculate kappa statistic.
print ( "Kappa statistic:" , confusion_matrix . kappa () . getInfo ())
Gửi ý kiến phản hồi
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.
Bạn muốn chia sẻ thêm với chúng tôi?
[[["Dễ hiểu","easyToUnderstand","thumb-up"],["Giúp tôi giải quyết được vấn đề","solvedMyProblem","thumb-up"],["Khác","otherUp","thumb-up"]],[["Thiếu thông tin tôi cần","missingTheInformationINeed","thumb-down"],["Quá phức tạp/quá nhiều bước","tooComplicatedTooManySteps","thumb-down"],["Đã lỗi thời","outOfDate","thumb-down"],["Vấn đề về bản dịch","translationIssue","thumb-down"],["Vấn đề về mẫu/mã","samplesCodeIssue","thumb-down"],["Khác","otherDown","thumb-down"]],["Cập nhật lần gần đây nhất: 2025-07-26 UTC."],[],[]]