ee.Reducer.percentile
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
สร้างตัวลดที่จะคำนวณเปอร์เซ็นไทล์ที่ระบุ เช่น เมื่อกำหนด [0, 50, 100] จะสร้างเอาต์พุตชื่อ "p0", "p50" และ "p100" โดยมีค่าต่ำสุด ค่ามัธยฐาน และค่าสูงสุดตามลำดับ สำหรับอินพุตจำนวนน้อย (ไม่เกิน maxRaw) ระบบจะคำนวณเปอร์เซ็นไทล์โดยตรง ส่วนอินพุตจำนวนมาก ระบบจะคำนวณเปอร์เซ็นไทล์จากฮิสโทแกรม
การใช้งาน | การคืนสินค้า |
---|
ee.Reducer.percentile(percentiles, outputNames, maxBuckets, minBucketWidth, maxRaw) | ตัวลดตำแหน่ง |
อาร์กิวเมนต์ | ประเภท | รายละเอียด |
---|
percentiles | รายการ | รายการตัวเลขระหว่าง 0 ถึง 100 |
outputNames | รายการ (ค่าเริ่มต้น: null) | รายการชื่อสำหรับเอาต์พุต หรือ null เพื่อรับชื่อเริ่มต้น |
maxBuckets | จำนวนเต็ม ค่าเริ่มต้น: null | จำนวนที่เก็บข้อมูลสูงสุดที่จะใช้เมื่อสร้างฮิสโตแกรม โดยจะปัดขึ้นเป็นเลขยกกำลังของ 2 |
minBucketWidth | ลอย ค่าเริ่มต้น: null | ความกว้างของ Bucket ฮิสโทแกรมขั้นต่ำ หรือ null เพื่ออนุญาตให้ใช้กำลัง 2 ใดก็ได้ |
maxRaw | จำนวนเต็ม ค่าเริ่มต้น: null | จำนวนค่าที่จะสะสมก่อนสร้างฮิสโทแกรมเริ่มต้น |
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-26 UTC
[null,null,["อัปเดตล่าสุด 2025-07-26 UTC"],[[["\u003cp\u003eThis reducer calculates specified percentiles (e.g., minimum, median, maximum) from a set of input values.\u003c/p\u003e\n"],["\u003cp\u003eFor smaller datasets, percentiles are computed directly; for larger datasets, a histogram-based approach is used for efficiency.\u003c/p\u003e\n"],["\u003cp\u003eUsers can customize the percentiles to compute, output band names, and fine-tune the histogram construction parameters.\u003c/p\u003e\n"]]],["The `ee.Reducer.percentile` function computes specified percentiles from a dataset. It accepts a list of `percentiles` (0-100) and optional `outputNames`. For large datasets, it builds a histogram with a `maxBuckets` limit and `minBucketWidth`. For smaller datasets (up to `maxRaw`), it computes percentiles directly. The function returns a Reducer, producing outputs with names like 'p0', 'p50', etc., representing the corresponding percentiles. The user can set custom names or null for defaults.\n"],null,["# ee.Reducer.percentile\n\nCreate a reducer that will compute the specified percentiles, e.g. given \\[0, 50, 100\\] will produce outputs named 'p0', 'p50', and 'p100' with the min, median, and max respectively. For small numbers of inputs (up to maxRaw) the percentiles will be computed directly; for larger numbers of inputs the percentiles will be derived from a histogram.\n\n\u003cbr /\u003e\n\n| Usage | Returns |\n|----------------------------------------------------------------------------------------------------------|---------|\n| `ee.Reducer.percentile(percentiles, `*outputNames* `, `*maxBuckets* `, `*minBucketWidth* `, `*maxRaw*`)` | Reducer |\n\n| Argument | Type | Details |\n|------------------|------------------------|-----------------------------------------------------------------------------------------------------|\n| `percentiles` | List | A list of numbers between 0 and 100. |\n| `outputNames` | List, default: null | A list of names for the outputs, or null to get default names. |\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. |"]]