公告:所有在
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。"],[],["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,[]]