सूचना : जिन गैर-व्यावसायिक प्रोजेक्ट के लिए Earth Engine को
15 अप्रैल, 2025 से पहले रजिस्टर किया गया है उन्हें ऐक्सेस बनाए रखने के लिए,
गैर-व्यावसायिक इस्तेमाल से जुड़ी ज़रूरी शर्तों की पुष्टि करनी होगी. अगर आपने 26 सितंबर, 2025 तक पुष्टि नहीं की, तो आपके ऐक्सेस को होल्ड पर रखा जा सकता है.
सुझाव भेजें
ee.ConfusionMatrix
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
कन्फ़्यूज़न मैट्रिक्स बनाता है. मैट्रिक्स का ऐक्सिस 0 (लाइनें), असल वैल्यू से मेल खाता है. वहीं, ऐक्सिस 1 (कॉलम), अनुमानित वैल्यू से मेल खाता है.
इस्तेमाल रिटर्न ee.ConfusionMatrix(array, order )
ConfusionMatrix
आर्ग्यूमेंट टाइप विवरण array
ऑब्जेक्ट पूर्णांकों की स्क्वेयर, 2D सरणी, जो भ्रमित करने वाले मैट्रिक्स को दिखाती है. ध्यान दें कि ee.Array कंस्ट्रक्टर के उलट, यह तर्क सूची नहीं ले सकता. order
सूची, डिफ़ॉल्ट: null बिना किसी क्रम के या शून्य से शुरू न होने वाले मैट्रिक्स के लिए, पंक्ति और कॉलम का साइज़ और क्रम.
उदाहरण
कोड एडिटर (JavaScript)
// A confusion matrix. Rows correspond to actual values, columns to
// predicted values.
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 ]]);
print ( 'Constructed confusion matrix' ,
ee . ConfusionMatrix ( array ));
// The "order" parameter refers to row and column class labels. When
// unspecified, the class labels are assumed to be a 0-based sequence
// incrementing by 1 with a length equal to row/column size.
print ( 'Default row/column labels (unspecified "order" parameter)' ,
ee . ConfusionMatrix ({ array : array , order : null }). order ());
// Set the "order" parameter when custom class label integers are required. The
// list of integer value labels should correspond to the matrix axes left to
// right / top to bottom.
var order = [ 11 , 22 , 42 , 52 , 71 , 81 ];
print ( 'Specified row/column labels (specified "order" parameter)' ,
ee . ConfusionMatrix ({ array : array , order : order }). order ());
Python सेटअप करना
Python API और इंटरैक्टिव डेवलपमेंट के लिए geemap
का इस्तेमाल करने के बारे में जानकारी पाने के लिए,
Python एनवायरमेंट पेज देखें.
import ee
import geemap.core as geemap
Colab (Python)
from pprint import pprint
# A confusion matrix. Rows correspond to actual values, columns to
# predicted values.
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 ]])
print ( 'Constructed confusion matrix:' )
pprint ( ee . ConfusionMatrix ( array ) . getInfo ())
# The "order" parameter refers to row and column class labels. When
# unspecified, the class labels are assumed to be a 0-based sequence
# incrementing by 1 with a length equal to row/column size.
print ( 'Default row/column labels (unspecified "order" parameter):' ,
ee . ConfusionMatrix ( array , None ) . order () . getInfo ())
# Set the "order" parameter when custom class label integers are required. The
# list of integer value labels should correspond to the matrix axes left to
# right / top to bottom.
order = [ 11 , 22 , 42 , 52 , 71 , 81 ]
print ( 'Specified row/column labels (specified "order" parameter):' ,
ee . ConfusionMatrix ( array , order ) . order () . getInfo ())
सुझाव भेजें
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 2025-07-26 (UTC) को अपडेट किया गया.
क्या आपको हमें और कुछ बताना है?
[[["समझने में आसान है","easyToUnderstand","thumb-up"],["मेरी समस्या हल हो गई","solvedMyProblem","thumb-up"],["अन्य","otherUp","thumb-up"]],[["वह जानकारी मौजूद नहीं है जो मुझे चाहिए","missingTheInformationINeed","thumb-down"],["बहुत मुश्किल है / बहुत सारे चरण हैं","tooComplicatedTooManySteps","thumb-down"],["पुराना","outOfDate","thumb-down"],["अनुवाद से जुड़ी समस्या","translationIssue","thumb-down"],["सैंपल / कोड से जुड़ी समस्या","samplesCodeIssue","thumb-down"],["अन्य","otherDown","thumb-down"]],["आखिरी बार 2025-07-26 (UTC) को अपडेट किया गया."],[],[]]