ee.Classifier.amnhMaxent

यह ज़्यादा से ज़्यादा एंट्रॉपी क्लासिफ़ायर बनाता है. Maxent का इस्तेमाल, प्रजातियों के डिस्ट्रिब्यूशन की संभावनाओं को मॉडल करने के लिए किया जाता है. इसके लिए, उन जगहों के एनवायरमेंटल डेटा का इस्तेमाल किया जाता है जहां प्रजातियों की मौजूदगी के बारे में पता है. साथ ही, बड़ी संख्या में 'बैकग्राउंड' जगहों के डेटा का इस्तेमाल किया जाता है. ज़्यादा जानकारी और उद्धरण के लिए, यहां जाएं: https://biodiversityinformatics.amnh.org/open_source/maxent/ और रेफ़रंस पब्लिकेशन: Phillips, et. al., 2004 A maximum entropy approach to species distribution modeling, Proceedings of the Twenty-First International Conference on Machine Learning. आउटपुट में 'probability' नाम का एक बैंड होता है, जिसमें मॉडल की संभावना होती है. साथ ही, 'writeClampGrid' आर्ग्युमेंट के सही होने पर, 'clamp' नाम का एक और बैंड होता है.

इस्तेमालरिटर्न
ee.Classifier.amnhMaxent(categoricalNames, outputFormat, autoFeature, linear, quadratic, product, threshold, hinge, hingeThreshold, l2lqThreshold, lq2lqptThreshold, addSamplesToBackground, addAllSamplesToBackground, betaMultiplier, betaHinge, betaLqp, betaCategorical, betaThreshold, extrapolate, doClamp, writeClampGrid, randomTestPoints, seed)कैटगरी तय करने वाला
आर्ग्यूमेंटटाइपविवरण
categoricalNamesसूची, डिफ़ॉल्ट: nullकैटगरी के हिसाब से इनपुट के नामों की सूची. इस तर्क में शामिल नहीं किए गए सभी इनपुट को लगातार माना जाता है.
outputFormatस्ट्रिंग, डिफ़ॉल्ट: "cloglog"आउटपुट में संभावनाओं को दिखाने का तरीका.
autoFeatureबूलियन, डिफ़ॉल्ट: trueट्रेनिंग के सैंपल की संख्या के आधार पर, यह अपने-आप तय करता है कि किन फ़ीचर क्लास का इस्तेमाल करना है.
linearबूलियन, डिफ़ॉल्ट: trueयह कुकी, लीनियर सुविधाओं को इस्तेमाल करने की अनुमति देती है. ऑटोफ़ీचर की वैल्यू सही होने पर, इस पर ध्यान न दें.
quadraticबूलियन, डिफ़ॉल्ट: trueक्वाड्रैटिक सुविधाओं को इस्तेमाल करने की अनुमति दें. ऑटोफ़ీचर की वैल्यू सही होने पर, इस पर ध्यान न दें.
productबूलियन, डिफ़ॉल्ट: trueप्रॉडक्ट की सुविधाओं का इस्तेमाल करने की अनुमति दें. ऑटोफ़ీचर की वैल्यू सही होने पर, इस पर ध्यान न दें.
thresholdबूलियन, डिफ़ॉल्ट वैल्यू: falseयह कुकी, थ्रेशोल्ड की सुविधाओं को इस्तेमाल करने की अनुमति देती है. ऑटोफ़ీचर की वैल्यू सही होने पर, इस पर ध्यान न दें.
hingeबूलियन, डिफ़ॉल्ट: trueइससे हिंज की सुविधाओं को इस्तेमाल करने की अनुमति मिलती है. ऑटोफ़ీचर की वैल्यू सही होने पर, इस पर ध्यान न दें.
hingeThresholdपूर्णांक, डिफ़ॉल्ट: 15नमूनों की वह संख्या जिस पर हिंज की सुविधाओं का इस्तेमाल शुरू किया जाता है. अगर autofeature की वैल्यू false है, तो इस पर ध्यान न दें.
l2lqThresholdपूर्णांक, डिफ़ॉल्ट: 10नमूनों की वह संख्या जिस पर क्वाडैटिक सुविधाओं का इस्तेमाल शुरू किया जाता है. अगर autofeature की वैल्यू false है, तो इस पर ध्यान न दें.
lq2lqptThresholdपूर्णांक, डिफ़ॉल्ट: 80नमूनों की वह संख्या जिस पर प्रॉडक्ट और थ्रेशोल्ड की सुविधाओं का इस्तेमाल शुरू किया जाता है. अगर autofeature की वैल्यू false है, तो इस पर ध्यान न दें.
addSamplesToBackgroundबूलियन, डिफ़ॉल्ट: trueबैकग्राउंड में ऐसा कोई भी सैंपल जोड़ो जिसमें पर्यावरण से जुड़ी वैल्यू का ऐसा कॉम्बिनेशन हो जो बैकग्राउंड में पहले से मौजूद न हो.
addAllSamplesToBackgroundबूलियन, डिफ़ॉल्ट वैल्यू: falseसभी सैंपल को बैकग्राउंड में जोड़ें. भले ही, उनमें पर्यावरण की ऐसी वैल्यू के कॉम्बिनेशन हों जो पहले से ही बैकग्राउंड में मौजूद हैं.
betaMultiplierफ़्लोट, डिफ़ॉल्ट: 1रेगुलराइज़ेशन मल्टीप्लायर. सभी ऑटोमैटिक रेगुलराइज़ेशन पैरामीटर को इस संख्या से गुणा करें. ज़्यादा संख्या होने पर, डिस्ट्रिब्यूशन ज़्यादा फैला हुआ होता है.
betaHingeफ़्लोट, डिफ़ॉल्ट: -1सभी हिंज सुविधाओं पर लागू होने वाला रेगुलराइज़ेशन पैरामीटर; नेगेटिव वैल्यू से ऑटोमैटिक सेटिंग चालू होती है.
betaLqpफ़्लोट, डिफ़ॉल्ट: -1सभी लीनियर, क्वाड्रेटिक, और प्रॉडक्ट सुविधाओं पर लागू होने वाला रेगुलराइज़ेशन पैरामीटर. नेगेटिव वैल्यू से, ऑटोमैटिक सेटिंग चालू हो जाती है.
betaCategoricalफ़्लोट, डिफ़ॉल्ट: -1सभी कैटगरी वाली सुविधाओं पर लागू होने वाला रेगुलराइज़ेशन पैरामीटर. नेगेटिव वैल्यू से, ऑटोमैटिक सेटिंग चालू हो जाती है.
betaThresholdफ़्लोट, डिफ़ॉल्ट: -1सभी थ्रेशोल्ड सुविधाओं पर लागू होने वाला रेगुलराइज़ेशन पैरामीटर. नेगेटिव वैल्यू से, अपने-आप सेटिंग चालू हो जाती है.
extrapolateबूलियन, डिफ़ॉल्ट: trueअनुमान लगाएं. ट्रेनिंग के दौरान मिली सीमाओं से बाहर के एनवायरमेंटल स्पेस के क्षेत्रों का अनुमान लगाना.
doClampबूलियन, डिफ़ॉल्ट: trueआउटपुट पर क्लैंपिंग लागू करें.
writeClampGridबूलियन, डिफ़ॉल्ट: trueयह फ़ंक्शन, आउटपुट में एक बैंड ('clamp') जोड़ता है. इससे क्लैंपिंग का स्पेशल डिस्ट्रिब्यूशन दिखता है. हर पॉइंट पर, वैल्यू, क्लैंपिंग के साथ और क्लैंपिंग के बिना अनुमानित वैल्यू के बीच का अंतर होती है.
randomTestPointsपूर्णांक, डिफ़ॉल्ट: 0रैंडम टेस्ट का प्रतिशत. यह टेस्ट पॉइंट के तौर पर अलग रखे जाने वाले ट्रेनिंग पॉइंट का प्रतिशत होता है. इसका इस्तेमाल, एयूएक्स, ओमिशन वगैरह का हिसाब लगाने के लिए किया जाता है.
seedLong, डिफ़ॉल्ट: 0यह रैंडम नंबर जनरेट करते समय इस्तेमाल किया जाने वाला सीड होता है.

उदाहरण

कोड एडिटर (JavaScript)

// Create some sample species presence/absence training data.
var trainingData = ee.FeatureCollection([
  // Species present points.
  ee.Feature(ee.Geometry.Point([-122.39567, 38.02740]), {presence: 1}),
  ee.Feature(ee.Geometry.Point([-122.68560, 37.83690]), {presence: 1}),
  // Species absent points.
  ee.Feature(ee.Geometry.Point([-122.59755, 37.92402]), {presence: 0}),
  ee.Feature(ee.Geometry.Point([-122.47137, 37.99291]), {presence: 0}),
  ee.Feature(ee.Geometry.Point([-122.52905, 37.85642]), {presence: 0}),
  ee.Feature(ee.Geometry.Point([-122.03010, 37.66660]), {presence: 0})
]);

// Import a Landsat 8 surface reflectance image.
var image = ee.Image('LANDSAT/LC08/C02/T1_L2/LC08_044034_20200606')
                // Select the optical and thermal bands.
                .select(['.._B.*']);

// Sample the image at the location of the points.
var training = image.sampleRegions({collection: trainingData, scale: 30});

// Define and train a Maxent classifier from the image-sampled points.
var classifier = ee.Classifier.amnhMaxent().train({
  features: training,
  classProperty: 'presence',
  inputProperties: image.bandNames()
});

// Classify the image using the Maxent classifier.
var imageClassified = image.classify(classifier);

// Display the layers on the map.
// Species presence probability [0, 1] grades from black to white.
Map.centerObject(image, 9);
Map.addLayer(
    image.select(['SR_B4', 'SR_B3', 'SR_B2']).multiply(0.0000275).add(-0.2),
    {min: 0, max: 0.3}, 'Image');
Map.addLayer(
    imageClassified, {bands: 'probability', min: 0, max: 1}, 'Probability');
Map.addLayer(
    trainingData.filter('presence == 0'), {color: 'red'},
    'Training data (species absent)');
Map.addLayer(
    trainingData.filter('presence == 1'), {color: 'blue'},
    'Training data (species present)');

Python सेटअप करना

Python API और इंटरैक्टिव डेवलपमेंट के लिए geemap का इस्तेमाल करने के बारे में जानकारी पाने के लिए, Python एनवायरमेंट पेज देखें.

import ee
import geemap.core as geemap

Colab (Python)

"""Demonstrates the ee.Classifier.amnhMaxent method."""

import ee


# Authenticates to the Earth Engine servers.
ee.Authenticate()
# Initializes the client library.
ee.Initialize()


# Create some sample species presence/absence training data.
training_data = ee.FeatureCollection([
    # Species present points.
    ee.Feature(ee.Geometry.Point([-122.39567, 38.02740]), {'presence': 1}),
    ee.Feature(ee.Geometry.Point([-122.68560, 37.83690]), {'presence': 1}),
    # Species absent points.
    ee.Feature(ee.Geometry.Point([-122.59755, 37.92402]), {'presence': 0}),
    ee.Feature(ee.Geometry.Point([-122.47137, 37.99291]), {'presence': 0}),
    ee.Feature(ee.Geometry.Point([-122.52905, 37.85642]), {'presence': 0}),
    ee.Feature(ee.Geometry.Point([-122.03010, 37.66660]), {'presence': 0})
])

# Import a Landsat 8 image and select the reflectance bands.
image = (ee.Image('LANDSAT/LC08/C02/T1_L2/LC08_044034_20200606')
         .select(['SR_B[1-7]'])
         .multiply(0.0000275).add(-0.2))  # Apply scaling factors.

# Sample the image at the location of the points.
training = image.sampleRegions(**{
    'collection': training_data,
    'scale': 30
})

# Define and train a Maxent classifier from the image-sampled points.
classifier = ee.Classifier.amnhMaxent().train(**{
    'features': training,
    'classProperty': 'presence',
    'inputProperties': image.bandNames()
})

# Classify the image using the Maxent classifier.
image_classified = image.classify(classifier)