ঘোষণা :
15 এপ্রিল, 2025 এর আগে আর্থ ইঞ্জিন ব্যবহার করার জন্য নিবন্ধিত সমস্ত অবাণিজ্যিক প্রকল্পগুলিকে অবশ্যই আর্থ ইঞ্জিন অ্যাক্সেস বজায় রাখার জন্য
অ-বাণিজ্যিক যোগ্যতা যাচাই করতে হবে।
তত্ত্বাবধানহীন শ্রেণীবিভাগ (ক্লাস্টারিং)
সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
ee.Clusterer
প্যাকেজ আর্থ ইঞ্জিনে তত্ত্বাবধানহীন শ্রেণিবিন্যাস (বা ক্লাস্টারিং ) পরিচালনা করে। এই অ্যালগরিদমগুলি বর্তমানে Weka- তে একই নামের অ্যালগরিদমের উপর ভিত্তি করে তৈরি। প্রতিটি Clusterer
সম্পর্কে আরও বিশদ রেফারেন্স ডক্সে উপলব্ধ।
ক্লাস্টারগুলি আর্থ ইঞ্জিনে শ্রেণীবদ্ধকারীর মতো একই পদ্ধতিতে ব্যবহৃত হয়। ক্লাস্টারিংয়ের জন্য সাধারণ কর্মপ্রবাহ হল:
- সাংখ্যিক বৈশিষ্ট্য সহ বৈশিষ্ট্যগুলি একত্রিত করুন যাতে ক্লাস্টারগুলি খুঁজে বের করা যায়৷
- একটি ক্লাস্টারার ইনস্ট্যান্টিয়েট করুন। প্রয়োজনে এর পরামিতি সেট করুন।
- প্রশিক্ষণ ডেটা ব্যবহার করে ক্লাস্টারকে প্রশিক্ষণ দিন।
- একটি চিত্র বা বৈশিষ্ট্য সংগ্রহে ক্লাস্টারার প্রয়োগ করুন।
- ক্লাস্টারগুলি লেবেল করুন।
প্রশিক্ষণের ডেটা হল বৈশিষ্ট্য সহ একটি FeatureCollection
যা ক্লাস্টারে ইনপুট করা হবে। ক্লাসিফায়ারের বিপরীতে, Clusterer
জন্য কোনো ইনপুট ক্লাস মান নেই। ক্লাসিফায়ারের মতো, ট্রেনের ডেটা এবং প্রয়োগের ধাপগুলির মান একই সংখ্যক হবে বলে আশা করা হচ্ছে। যখন একটি প্রশিক্ষিত ক্লাস্টারার একটি চিত্র বা টেবিলে প্রয়োগ করা হয়, তখন এটি প্রতিটি পিক্সেল বা বৈশিষ্ট্যের জন্য একটি পূর্ণসংখ্যা ক্লাস্টার আইডি বরাদ্দ করে।
এখানে একটি ee.Clusterer
নির্মাণ এবং ব্যবহার করার একটি সহজ উদাহরণ:
কোড এডিটর (জাভাস্ক্রিপ্ট)
// Define a region in which to generate a segmented map.
var region = ee.Geometry.Rectangle(29.7, 30, 32.5, 31.7);
// Load a Landsat composite for input.
var input = ee.ImageCollection('LANDSAT/COMPOSITES/C02/T1_L2_32DAY')
.filterDate('2001-05', '2001-06')
.first()
.clip(region);
// Display the sample region.
Map.setCenter(31.5, 31.0, 8);
Map.addLayer(ee.Image().paint(region, 0, 2), {}, 'region');
// Make the training dataset.
var training = input.sample({
region: region,
scale: 30,
numPixels: 5000
});
// Instantiate the clusterer and train it.
var clusterer = ee.Clusterer.wekaKMeans(15).train(training);
// Cluster the input using the trained clusterer.
var result = input.cluster(clusterer);
// Display the clusters with random colors.
Map.addLayer(result.randomVisualizer(), {}, 'clusters');
পাইথন সেটআপ
পাইথন এপিআই এবং ইন্টারেক্টিভ ডেভেলপমেন্টের জন্য geemap
ব্যবহার করার জন্য পাইথন এনভায়রনমেন্ট পৃষ্ঠাটি দেখুন।
import ee
import geemap.core as geemap
Colab (পাইথন)
# Define a region in which to generate a segmented map.
region = ee.Geometry.Rectangle(29.7, 30, 32.5, 31.7)
# Load a Landsat composite for input.
input = (
ee.ImageCollection('LANDSAT/COMPOSITES/C02/T1_L2_32DAY')
.filterDate('2001-05', '2001-06')
.first()
.clip(region)
)
# Display the sample region.
m = geemap.Map()
m.set_center(31.5, 31.0, 8)
m.add_layer(ee.Image().paint(region, 0, 2), {}, 'region')
# Make the training dataset.
training = input.sample(region=region, scale=30, numPixels=5000)
# Instantiate the clusterer and train it.
clusterer = ee.Clusterer.wekaKMeans(15).train(training)
# Cluster the input using the trained clusterer.
result = input.cluster(clusterer)
# Display the clusters with random colors.
m.add_layer(result.randomVisualizer(), {}, 'clusters')
m
দয়া করে নোট করুন:
- একই ইনপুটগুলি সর্বদা একই আউটপুট তৈরি করা উচিত, তবে ইনপুটগুলিকে পুনরায় সাজানো ফলাফল পরিবর্তন করতে পারে।
- যত কম 10 ব্যান্ড * 100k পয়েন্ট সহ প্রশিক্ষণ একটি আউট অফ মেমরি ত্রুটি তৈরি করতে পারে।
- কোবওয়েব শেষ হতে অনেক সময় নিতে পারে এবং প্রচুর সংখ্যক ক্লাস্টার তৈরি করতে পারে।
- আউটপুট ক্লাস্টার এবং তাদের আইডিগুলি অ্যালগরিদম এবং ইনপুটগুলির উপর নির্ভরশীল।
অন্য কিছু উল্লেখ না করা থাকলে, এই পৃষ্ঠার কন্টেন্ট Creative Commons Attribution 4.0 License-এর অধীনে এবং কোডের নমুনাগুলি Apache 2.0 License-এর অধীনে লাইসেন্স প্রাপ্ত। আরও জানতে, Google Developers সাইট নীতি দেখুন। Java হল Oracle এবং/অথবা তার অ্যাফিলিয়েট সংস্থার রেজিস্টার্ড ট্রেডমার্ক।
2025-07-24 UTC-তে শেষবার আপডেট করা হয়েছে।
[null,null,["2025-07-24 UTC-তে শেষবার আপডেট করা হয়েছে।"],[[["\u003cp\u003eThe \u003ccode\u003eee.Clusterer\u003c/code\u003e package in Earth Engine enables unsupervised classification (clustering) using algorithms from Weka.\u003c/p\u003e\n"],["\u003cp\u003eThe clustering workflow involves assembling features, instantiating and training a clusterer, applying it to data, and labeling the resulting clusters.\u003c/p\u003e\n"],["\u003cp\u003eTraining data for clustering is a \u003ccode\u003eFeatureCollection\u003c/code\u003e with numeric properties, and the output assigns integer cluster IDs to pixels or features.\u003c/p\u003e\n"],["\u003cp\u003eCluster results can vary based on input order and the specific algorithm used, and large datasets may lead to memory errors.\u003c/p\u003e\n"],["\u003cp\u003eEarth Engine provides various clustering algorithms, each with its own characteristics and potential limitations, such as Cobweb's runtime and cluster count.\u003c/p\u003e\n"]]],["`ee.Clusterer` in Earth Engine performs unsupervised classification. The process involves assembling features, instantiating a clusterer (like `wekaKMeans`), and training it with a `FeatureCollection`. The trained clusterer is then applied to an image or feature collection, assigning an integer cluster ID to each element. The provided example loads Landsat data, samples it for training, and applies a trained clusterer to visualize the resulting clusters. The number of features in the dataset can impact the performance and stability of the clusterer.\n"],null,["# Unsupervised Classification (clustering)\n\nThe `ee.Clusterer` package handles unsupervised classification (or\n*clustering* ) in Earth Engine. These algorithms are currently based on the\nalgorithms with the same name in [Weka](http://www.cs.waikato.ac.nz/ml/weka/).\nMore details about each `Clusterer` are available in the\n[reference docs](/earth-engine/apidocs).\n\nClusterers are used in the same manner as classifiers in Earth Engine. The general\nworkflow for clustering is:\n\n1. Assemble features with numeric properties in which to find clusters.\n2. Instantiate a clusterer. Set its parameters if necessary.\n3. Train the clusterer using the training data.\n4. Apply the clusterer to an image or feature collection.\n5. Label the clusters.\n\nThe training data is a `FeatureCollection` with properties that will be\ninput to the clusterer. Unlike classifiers, there is no input class value for an\n`Clusterer`. Like classifiers, the data for the train and apply steps are\nexpected to have the same number of values. When a trained clusterer is applied to an image\nor table, it assigns an integer cluster ID to each pixel or feature.\n\nHere is a simple example of building and using an `ee.Clusterer`:\n\n### Code Editor (JavaScript)\n\n```javascript\n// Define a region in which to generate a segmented map.\nvar region = ee.Geometry.Rectangle(29.7, 30, 32.5, 31.7);\n\n// Load a Landsat composite for input.\nvar input = ee.ImageCollection('LANDSAT/COMPOSITES/C02/T1_L2_32DAY')\n .filterDate('2001-05', '2001-06')\n .first()\n .clip(region);\n\n// Display the sample region.\nMap.setCenter(31.5, 31.0, 8);\nMap.addLayer(ee.Image().paint(region, 0, 2), {}, 'region');\n\n// Make the training dataset.\nvar training = input.sample({\n region: region,\n scale: 30,\n numPixels: 5000\n});\n\n// Instantiate the clusterer and train it.\nvar clusterer = ee.Clusterer.wekaKMeans(15).train(training);\n\n// Cluster the input using the trained clusterer.\nvar result = input.cluster(clusterer);\n\n// Display the clusters with random colors.\nMap.addLayer(result.randomVisualizer(), {}, 'clusters');\n```\nPython setup\n\nSee the [Python Environment](/earth-engine/guides/python_install) page for information on the Python API and using\n`geemap` for interactive development. \n\n```python\nimport ee\nimport geemap.core as geemap\n```\n\n### Colab (Python)\n\n```python\n# Define a region in which to generate a segmented map.\nregion = ee.Geometry.Rectangle(29.7, 30, 32.5, 31.7)\n\n# Load a Landsat composite for input.\ninput = (\n ee.ImageCollection('LANDSAT/COMPOSITES/C02/T1_L2_32DAY')\n .filterDate('2001-05', '2001-06')\n .first()\n .clip(region)\n)\n\n# Display the sample region.\nm = geemap.Map()\nm.set_center(31.5, 31.0, 8)\nm.add_layer(ee.Image().paint(region, 0, 2), {}, 'region')\n\n# Make the training dataset.\ntraining = input.sample(region=region, scale=30, numPixels=5000)\n\n# Instantiate the clusterer and train it.\nclusterer = ee.Clusterer.wekaKMeans(15).train(training)\n\n# Cluster the input using the trained clusterer.\nresult = input.cluster(clusterer)\n\n# Display the clusters with random colors.\nm.add_layer(result.randomVisualizer(), {}, 'clusters')\nm\n```\n\nPlease note:\n\n- The same inputs should always produce the same outputs, but reordering the inputs can change the results.\n- Training with as few as 10 bands \\* 100k points can produce an Out Of Memory error.\n- Cobweb can take a long time to finish and can produce a large number of clusters.\n- The output clusters and their IDs are dependent on the algorithm and inputs."]]