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" ซึ่งมีค่าความน่าจะเป็นที่สร้างแบบจำลอง และแถบเพิ่มเติมชื่อ "clamp" เมื่ออาร์กิวเมนต์ "writeClampGrid" เป็นจริง

การใช้งานการคืนสินค้า
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บูลีน ค่าเริ่มต้น: จริงเลือกคลาสฟีเจอร์ที่จะใช้โดยอัตโนมัติตามจำนวนตัวอย่างการฝึก
linearบูลีน ค่าเริ่มต้น: จริงอนุญาตให้ใช้ฟีเจอร์เชิงเส้น ระบบจะไม่สนใจเมื่อ autofeature เป็นจริง
quadraticบูลีน ค่าเริ่มต้น: จริงอนุญาตให้ใช้ฟีเจอร์กำลังสอง ระบบจะไม่สนใจเมื่อ autofeature เป็นจริง
productบูลีน ค่าเริ่มต้น: จริงอนุญาตให้ใช้ฟีเจอร์ของผลิตภัณฑ์ ระบบจะไม่สนใจเมื่อ autofeature เป็นจริง
thresholdบูลีน ค่าเริ่มต้น: falseอนุญาตให้ใช้ฟีเจอร์เกณฑ์ ระบบจะไม่สนใจเมื่อ autofeature เป็นจริง
hingeบูลีน ค่าเริ่มต้น: จริงอนุญาตให้ใช้ฟีเจอร์บานพับ ระบบจะไม่สนใจเมื่อ autofeature เป็นจริง
hingeThresholdจำนวนเต็ม ค่าเริ่มต้น: 15จำนวนตัวอย่างที่เริ่มใช้ฟีเจอร์บานพับ ระบบจะไม่สนใจเมื่อ autofeature เป็นเท็จ
l2lqThresholdจำนวนเต็ม ค่าเริ่มต้น: 10จำนวนตัวอย่างที่เริ่มใช้ฟีเจอร์กำลังสอง ระบบจะไม่สนใจเมื่อ autofeature เป็นเท็จ
lq2lqptThresholdจำนวนเต็ม ค่าเริ่มต้น: 80จํานวนตัวอย่างที่ระบบจะเริ่มใช้ฟีเจอร์ผลิตภัณฑ์และเกณฑ์ ระบบจะไม่สนใจเมื่อ autofeature เป็นเท็จ
addSamplesToBackgroundบูลีน ค่าเริ่มต้น: จริงเพิ่มตัวอย่างที่มีค่าสภาพแวดล้อมที่ยังไม่มีในพื้นหลังลงในพื้นหลัง
addAllSamplesToBackgroundบูลีน ค่าเริ่มต้น: falseเพิ่มตัวอย่างทั้งหมดลงในพื้นหลัง แม้ว่าตัวอย่างจะมีค่าสภาพแวดล้อมที่ผสมกันซึ่งมีอยู่ในพื้นหลังแล้วก็ตาม
betaMultiplierFloat, ค่าเริ่มต้น: 1ตัวคูณการทำให้เป็นปกติ คูณพารามิเตอร์การทำให้เป็นค่าปกติอัตโนมัติทั้งหมดด้วยตัวเลขนี้ ตัวเลขที่สูงขึ้นจะทำให้การกระจายมีความสม่ำเสมอมากขึ้น
betaHingeFloat, ค่าเริ่มต้น: -1พารามิเตอร์การปรับค่าปกติที่จะใช้กับฟีเจอร์บานพับทั้งหมด ค่าลบจะเปิดใช้การตั้งค่าอัตโนมัติ
betaLqpFloat, ค่าเริ่มต้น: -1พารามิเตอร์การปรับค่าปกติที่จะใช้กับฟีเจอร์เชิงเส้น กำลังสอง และผลิตภัณฑ์ทั้งหมด ค่าลบจะเปิดใช้การตั้งค่าอัตโนมัติ
betaCategoricalFloat, ค่าเริ่มต้น: -1พารามิเตอร์การปรับค่าปกติที่จะใช้กับฟีเจอร์เชิงหมวดหมู่ทั้งหมด ค่าลบจะเปิดใช้การตั้งค่าอัตโนมัติ
betaThresholdFloat, ค่าเริ่มต้น: -1พารามิเตอร์การปรับค่าที่จะใช้กับฟีเจอร์เกณฑ์ทั้งหมด ค่าลบจะเปิดใช้การตั้งค่าอัตโนมัติ
extrapolateบูลีน ค่าเริ่มต้น: จริงคาดการณ์ คาดการณ์ไปยังภูมิภาคของพื้นที่สภาพแวดล้อมที่อยู่นอกขีดจำกัดที่พบระหว่างการฝึก
doClampบูลีน ค่าเริ่มต้น: จริงใช้การยึดกับเอาต์พุต
writeClampGridบูลีน ค่าเริ่มต้น: จริงเพิ่มแถบลงในเอาต์พุต ("clamp") ซึ่งแสดงการกระจายเชิงพื้นที่ของการแคลมป์ ในแต่ละจุด ค่าคือความแตกต่างสัมบูรณ์ระหว่างค่าการคาดการณ์ที่มีและไม่มีการแคลมป์
randomTestPointsจำนวนเต็ม ค่าเริ่มต้น: 0เปอร์เซ็นต์การทดสอบแบบสุ่ม เปอร์เซ็นต์ของจุดฝึกอบรมที่จะเก็บไว้เป็นจุดทดสอบ ซึ่งใช้ในการคำนวณ AUX, การละเว้น ฯลฯ
seedยาว ค่าเริ่มต้น: 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)