ee.ImageCollection.randomColumn
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
הוספת עמודה של מספרים פסאודו-אקראיים דטרמיניסטיים לאוסף. הפלט הוא מספרים של נקודה צפה (floating-point) ברמת דיוק כפולה. כשמשתמשים בהתפלגות 'uniform' (ברירת המחדל), הפלט נמצא בטווח [0, 1). כשמשתמשים בהתפלגות 'נורמלית', הערכים של הפלט הם μ=0, σ=1, אבל אין להם מגבלות מפורשות.
שימוש | החזרות |
---|
ImageCollection.randomColumn(columnName, seed, distribution, rowKeys) | FeatureCollection |
ארגומנט | סוג | פרטים |
---|
זה: collection | FeatureCollection | אוסף הקלט שאליו רוצים להוסיף עמודה אקראית. |
columnName | מחרוזת, ברירת המחדל: 'random' | השם של העמודה שרוצים להוסיף. |
seed | ארוך, ברירת המחדל: 0 | זרע שמשמש ליצירת המספרים האקראיים. |
distribution | מחרוזת, ברירת המחדל: uniform | סוג ההתפלגות של המספרים האקראיים שייווצרו. אפשר לבחור באפשרויות 'עקבי' או 'נורמלי'. |
rowKeys | רשימה, אופציונלי | רשימה של מאפיינים שצריכים לזהות באופן ייחודי וחזרתי אלמנט בקולקציה, המשמשת ליצירת המספר האקראי. ברירת המחדל היא [system:index]. |
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-07-25 (שעון UTC).
[null,null,["עדכון אחרון: 2025-07-25 (שעון UTC)."],[[["\u003cp\u003eAdds a new column of random numbers to an existing FeatureCollection.\u003c/p\u003e\n"],["\u003cp\u003eUsers can specify the column name, seed for reproducibility, and distribution type (uniform or normal).\u003c/p\u003e\n"],["\u003cp\u003eThe 'uniform' distribution generates numbers between 0 (inclusive) and 1 (exclusive), while the 'normal' distribution generates numbers with a mean of 0 and standard deviation of 1.\u003c/p\u003e\n"],["\u003cp\u003eThe output is a new FeatureCollection with the added random column.\u003c/p\u003e\n"]]],[],null,["# ee.ImageCollection.randomColumn\n\nAdds a column of deterministic pseudorandom numbers to a collection. The outputs are double-precision floating point numbers. When using the 'uniform' distribution (default), outputs are in the range of \\[0, 1). Using the 'normal' distribution, outputs have μ=0, σ=1, but have no explicit limits.\n\n\u003cbr /\u003e\n\n| Usage | Returns |\n|--------------------------------------------------------------------------------------------|-------------------|\n| ImageCollection.randomColumn`(`*columnName* `, `*seed* `, `*distribution* `, `*rowKeys*`)` | FeatureCollection |\n\n| Argument | Type | Details |\n|--------------------|----------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| this: `collection` | FeatureCollection | The input collection to which to add a random column. |\n| `columnName` | String, default: \"random\" | The name of the column to add. |\n| `seed` | Long, default: 0 | A seed used when generating the random numbers. |\n| `distribution` | String, default: \"uniform\" | The distribution type of random numbers to produce; one of 'uniform' or 'normal'. |\n| `rowKeys` | List, optional | A list of properties that should uniquely and repeatably identify an element of the collection, used to generate the random number. Defaults to \\[system:index\\]. |"]]