公告:所有在
2025 年 4 月 15 日之前注册使用 Earth Engine 的非商业项目都必须
验证是否符合非商业性质的资格条件,才能继续使用 Earth Engine。
ee.Clusterer.train
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
使用每个特征的指定数值属性作为训练数据,对 Clusterer 进行训练。系统会忽略要素的几何图形。
用法 | 返回 |
---|
Clusterer.train(features, inputProperties, subsampling, subsamplingSeed) | 聚类器 |
参数 | 类型 | 详细信息 |
---|
此:clusterer | 聚类器 | 输入聚类器。 |
features | FeatureCollection | 要训练的集合。 |
inputProperties | 列表,默认值:null | 要纳入训练数据的属性名称列表。每个特征都必须具有所有这些属性,并且其值必须为数值。如果输入集合包含“band_order”属性(由 Image.sample 生成),则此实参是可选的。 |
subsampling | 浮点数,默认值:1 | 可选的子采样率,范围为 (0, 1]。 |
subsamplingSeed | 整数,默认值:0 | 用于子采样的随机化种子。 |
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-26。
[null,null,["最后更新时间 (UTC):2025-07-26。"],[[["\u003cp\u003eTrains a clusterer using numeric properties of features, ignoring geometry.\u003c/p\u003e\n"],["\u003cp\u003eRequires a feature collection and optionally specifies input properties for training.\u003c/p\u003e\n"],["\u003cp\u003eAllows for subsampling of the training data using a factor and seed.\u003c/p\u003e\n"],["\u003cp\u003eReturns the trained Clusterer object for further use.\u003c/p\u003e\n"]]],["The `Clusterer.train` method trains a Clusterer using a FeatureCollection. It takes a collection of features and uses their numeric properties as training data, ignoring feature geometry. Users specify `inputProperties` (a list of numeric property names) to be used for training. Subsampling can be employed by setting the `subsampling` (factor between 0 and 1) and optionally, the `subsamplingSeed` to control randomness. The method returns the trained `Clusterer` object.\n"],null,["# ee.Clusterer.train\n\nTrains the Clusterer on a collection of features using the specified numeric properties of each feature as training data. The geometry of the features is ignored.\n\n\u003cbr /\u003e\n\n| Usage | Returns |\n|------------------------------------------------------------------------------------------|-----------|\n| Clusterer.train`(features, `*inputProperties* `, `*subsampling* `, `*subsamplingSeed*`)` | Clusterer |\n\n| Argument | Type | Details |\n|-------------------|---------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| this: `clusterer` | Clusterer | An input Clusterer. |\n| `features` | FeatureCollection | The collection to train on. |\n| `inputProperties` | List, default: null | The list of property names to include as training data. Each feature must have all these properties, and their values must be numeric. This argument is optional if the input collection contains a 'band_order' property (as produced by Image.sample). |\n| `subsampling` | Float, default: 1 | An optional subsampling factor, within (0, 1\\]. |\n| `subsamplingSeed` | Integer, default: 0 | A randomization seed to use for subsampling. |"]]