公告:凡是在
2025 年 4 月 15 日前註冊使用 Earth Engine 的非商業專案,都必須
驗證非商業用途資格,才能繼續存取。如未在 2025 年 9 月 26 日前完成驗證,存取權可能會暫停。
ee.Reducer.percentile
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
建立可計算指定百分位數的縮減器,例如指定 [0、50、100] 會產生名為「p0」、「p50」和「p100」的輸出內容,分別代表最小值、中位數和最大值。如果輸入的資料量較少 (最多 maxRaw),系統會直接計算百分位數;如果輸入的資料量較多,系統則會從直方圖衍生百分位數。
| 用量 | 傳回 |
|---|
ee.Reducer.percentile(percentiles, outputNames, maxBuckets, minBucketWidth, maxRaw) | 縮減函式 |
| 引數 | 類型 | 詳細資料 |
|---|
percentiles | 清單 | 介於 0 到 100 之間的數字清單。 |
outputNames | 清單,預設值為空值 | 輸出內容的名稱清單,或為空值以取得預設名稱。 |
maxBuckets | 整數,預設值為 null | 建構直方圖時使用的最大值範圍數量,會向上取整為 2 的乘方。 |
minBucketWidth | 浮點值,預設值為空值 | 直方圖儲存區寬度下限,或為空值,允許任何 2 的乘冪。 |
maxRaw | 整數,預設值為 null | 建構初始直方圖前要累積的值數量。 |
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-26 (世界標準時間)。
[null,null,["上次更新時間:2025-07-26 (世界標準時間)。"],[],["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"]]