ee.Reducer.median
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
एक रिड्यूसर बनाएं, जो इनपुट का मीडियन कंप्यूट करेगा. कम संख्या में इनपुट (maxRaw तक) के लिए, मीडियन का हिसाब सीधे तौर पर लगाया जाएगा. ज़्यादा संख्या में इनपुट के लिए, मीडियन को हिस्टोग्राम से निकाला जाएगा.
इस्तेमाल | रिटर्न |
---|
ee.Reducer.median(maxBuckets, minBucketWidth, maxRaw) | रेड्यूसर |
आर्ग्यूमेंट | टाइप | विवरण |
---|
maxBuckets | पूर्णांक, डिफ़ॉल्ट: null | हिस्टोग्राम बनाते समय इस्तेमाल किए जाने वाले बकेट की ज़्यादा से ज़्यादा संख्या. इसे दो की घात के हिसाब से राउंड अप किया जाएगा. |
minBucketWidth | फ़्लोट, डिफ़ॉल्ट: null | हिस्टोग्राम बकेट की कम से कम चौड़ाई या किसी भी पावर ऑफ़ 2 की अनुमति देने के लिए शून्य. |
maxRaw | पूर्णांक, डिफ़ॉल्ट: null | शुरुआती हिस्टोग्राम बनाने से पहले, इकट्ठा की जाने वाली वैल्यू की संख्या. |
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 2025-07-26 (UTC) को अपडेट किया गया.
[null,null,["आखिरी बार 2025-07-26 (UTC) को अपडेट किया गया."],[[["\u003cp\u003eThis reducer calculates the median of input values, using either direct computation or a histogram-based approach depending on the input size.\u003c/p\u003e\n"],["\u003cp\u003eFor small datasets (up to \u003ccode\u003emaxRaw\u003c/code\u003e values), the median is computed directly from the raw input values.\u003c/p\u003e\n"],["\u003cp\u003eFor larger datasets, the reducer constructs a histogram with a maximum of \u003ccode\u003emaxBuckets\u003c/code\u003e, potentially rounding up to the nearest power of 2, and \u003ccode\u003eminBucketWidth\u003c/code\u003e as the minimum width of each bucket for efficient approximation.\u003c/p\u003e\n"],["\u003cp\u003eUsers can control the calculation process by specifying parameters like \u003ccode\u003emaxBuckets\u003c/code\u003e, \u003ccode\u003eminBucketWidth\u003c/code\u003e, and \u003ccode\u003emaxRaw\u003c/code\u003e to customize the reducer's behavior.\u003c/p\u003e\n"]]],["The core content describes a reducer that calculates the median of inputs. For smaller datasets (up to `maxRaw`), the median is directly computed. Larger datasets utilize a histogram for median derivation. The `ee.Reducer.median` function creates this reducer, accepting `maxBuckets` (maximum histogram buckets), `minBucketWidth` (minimum bucket size), and `maxRaw` (raw values threshold) as parameters to customize the histogram creation.\n"],null,["# ee.Reducer.median\n\nCreate a reducer that will compute the median of the inputs. For small numbers of inputs (up to maxRaw) the median will be computed directly; for larger numbers of inputs the median will be derived from a histogram.\n\n\u003cbr /\u003e\n\n| Usage | Returns |\n|-----------------------------------------------------------------------|---------|\n| `ee.Reducer.median(`*maxBuckets* `, `*minBucketWidth* `, `*maxRaw*`)` | Reducer |\n\n| Argument | Type | Details |\n|------------------|------------------------|-----------------------------------------------------------------------------------------------------|\n| `maxBuckets` | Integer, default: null | The maximum number of buckets to use when building a histogram; will be rounded up to a power of 2. |\n| `minBucketWidth` | Float, default: null | The minimum histogram bucket width, or null to allow any power of 2. |\n| `maxRaw` | Integer, default: null | The number of values to accumulate before building the initial histogram. |"]]