ee.Clusterer.train
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.
Huấn luyện Clusterer trên một tập hợp các đối tượng bằng cách sử dụng các thuộc tính số được chỉ định của từng đối tượng làm dữ liệu huấn luyện. Hình học của các đối tượng sẽ bị bỏ qua.
Cách sử dụng | Giá trị trả về |
---|
Clusterer.train(features, inputProperties, subsampling, subsamplingSeed) | Clusterer |
Đối số | Loại | Thông tin chi tiết |
---|
this: clusterer | Clusterer | Một Input Clusterer. |
features | FeatureCollection | Bộ sưu tập để huấn luyện. |
inputProperties | Danh sách, mặc định: null | Danh sách tên thuộc tính cần đưa vào làm dữ liệu huấn luyện. Mỗi đối tượng phải có tất cả các thuộc tính này và giá trị của các thuộc tính phải là giá trị bằng số. Đối số này là không bắt buộc nếu tập hợp đầu vào chứa thuộc tính "band_order" (do Image.sample tạo ra). |
subsampling | Số thực, mặc định: 1 | Một hệ số lấy mẫu phụ không bắt buộc, trong khoảng (0, 1]. |
subsamplingSeed | Số nguyên, mặc định: 0 | Một dữ liệu gốc ngẫu nhiên để dùng cho việc lấy mẫu phụ. |
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\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. |"]]