お知らせ:
2025 年 4 月 15 日より前に Earth Engine の使用を登録したすべての非商用プロジェクトは、Earth Engine へのアクセスを維持するために
非商用目的での利用資格を確認する必要があります。
ee.Classifier.amnhMaxent
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
最大エントロピー分類器を作成します。Maxent は、既知の生息地の環境データと、多数の「バックグラウンド」の生息地の環境データを使用して、種の分布確率をモデル化するために使用されます。詳細と引用については、https://biodiversityinformatics.amnh.org/open_source/maxent/ をご覧ください。また、参考文献として Phillips らの論文(2004 年、種分布モデリングに対する最大エントロピー アプローチ、第 21 回国際機械学習会議の議事録。出力は、モデル化された確率を含む「probability」という名前の単一のバンドです。また、「writeClampGrid」引数が true の場合は、「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 です。 | 線形フィーチャーの使用を許可します。autofeature が true の場合は無視されます。 |
quadratic | ブール値。デフォルト値は true です。 | 二次特徴の使用を許可します。autofeature が true の場合は無視されます。 |
product | ブール値。デフォルト値は true です。 | プロダクト機能の使用を許可します。autofeature が true の場合は無視されます。 |
threshold | ブール値。デフォルト値は false です。 | しきい値機能の使用を許可します。autofeature が true の場合は無視されます。 |
hinge | ブール値。デフォルト値は true です。 | ヒンジ機能の使用を許可します。autofeature が true の場合は無視されます。 |
hingeThreshold | 整数、デフォルト: 15 | ヒンジ特徴の使用が開始されるサンプル数。autofeature が false の場合は無視されます。 |
l2lqThreshold | 整数、デフォルト: 10 | 2 次特徴の使用が開始されるサンプル数。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 です。 | クランプの空間分布を示すバンドを出力に追加します(「クランプ」)。各ポイントの値は、クランプありとクランプなしの予測値の絶対差です。 |
randomTestPoints | 整数、デフォルト: 0 | ランダム テストの割合。テストポイントとして保持するトレーニング ポイントの割合。AUX、省略などを計算するために使用されます。 |
seed | Long、デフォルト: 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)
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-07-26 UTC。
[null,null,["最終更新日 2025-07-26 UTC。"],[[["\u003cp\u003eModels species distribution probabilities using environmental data and known presence/absence locations.\u003c/p\u003e\n"],["\u003cp\u003eEmploys the Maximum Entropy (Maxent) algorithm for modeling.\u003c/p\u003e\n"],["\u003cp\u003eOutputs a probability band representing the modeled probability of species presence.\u003c/p\u003e\n"],["\u003cp\u003eOptionally includes a "clamp" band indicating areas where the prediction was limited.\u003c/p\u003e\n"],["\u003cp\u003eRefer to Phillips et al., 2004 for further details and citation.\u003c/p\u003e\n"]]],["The core function creates a Maximum Entropy (Maxent) classifier to model species distribution probabilities. This classifier uses environmental data from known species presence locations and background locations. Key actions include training the classifier with presence/absence data, selecting features such as linear, quadratic, product, threshold, and hinge, and defining categorical inputs. The output includes a probability band, and optionally a clamp band showing the clamping difference, which is generated when using the `writeClampGrid` argument. It uses settings for extrapolation, clamping, and regularization.\n"],null,[]]