ee.Reducer.percentile
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Tạo một hàm giảm sẽ tính toán các phân vị được chỉ định, ví dụ: cho [0, 50, 100] sẽ tạo ra các đầu ra có tên "p0", "p50" và "p100" với giá trị tối thiểu, trung vị và tối đa tương ứng. Đối với số lượng nhỏ các đầu vào (tối đa là maxRaw), các phân vị sẽ được tính toán trực tiếp; đối với số lượng lớn các đầu vào, các phân vị sẽ được lấy từ biểu đồ.
Cách sử dụng | Giá trị trả về |
---|
ee.Reducer.percentile(percentiles, outputNames, maxBuckets, minBucketWidth, maxRaw) | Bộ giảm tốc |
Đối số | Loại | Thông tin chi tiết |
---|
percentiles | Danh sách | Một danh sách các số từ 0 đến 100. |
outputNames | Danh sách, mặc định: null | Danh sách tên cho các đầu ra hoặc giá trị rỗng để lấy tên mặc định. |
maxBuckets | Số nguyên, mặc định: null | Số lượng nhóm tối đa cần dùng khi tạo biểu đồ; sẽ được làm tròn lên thành luỹ thừa của 2. |
minBucketWidth | Float, mặc định: null | Độ rộng tối thiểu của vùng chứa biểu đồ tần suất hoặc giá trị rỗng để cho phép mọi luỹ thừa của 2. |
maxRaw | Số nguyên, mặc định: null | Số lượng giá trị cần tích luỹ trước khi tạo biểu đồ tần suất ban đầu. |
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2025-07-26 UTC.
[null,null,["Cập nhật lần gần đây nhất: 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. |"]]