公告:凡是在 
2025 年 4 月 15 日前註冊使用 Earth Engine 的非商業專案,都必須
驗證非商業用途資格,才能繼續存取。如未在 2025 年 9 月 26 日前完成驗證,存取權可能會暫停。
  
        
 
       
     
  
  
  
    
  
  
  
    
      ee.Clusterer.train
    
    
      
    
    
      
      透過集合功能整理內容
    
    
      
      你可以依據偏好儲存及分類內容。
    
  
  
      
    
  
  
  
  
  
    
  
  
    
    
    
  
  
:使用每個特徵的指定數值屬性做為訓練資料,訓練特徵集合的 Clusterer。系統會忽略特徵的幾何。
| 用量 | 傳回 | 
|---|
| Clusterer.train(features, inputProperties, subsampling, subsamplingSeed) | 叢集器 | 
| 引數 | 類型 | 詳細資料 | 
|---|
| 這個: clusterer | 叢集器 | 輸入的 Clusterer。 | 
| features | FeatureCollection | 要用於訓練的集合。 | 
| inputProperties | 清單,預設值為空值 | 要納入訓練資料的屬性名稱清單。每個特徵都必須具備這些屬性,且值必須是數值。如果輸入的集合包含「band_order」屬性 (由 Image.sample 產生),則這個引數為選用。 | 
| subsampling | 浮點值,預設值為 1 | 選用的子取樣因數,範圍為 (0, 1]。 | 
| subsamplingSeed | 整數,預設值為 0 | 用於子取樣的隨機化種子。 | 
  
  
  
  
  
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
  上次更新時間:2025-07-26 (世界標準時間)。
  
  
  
    
      [null,null,["上次更新時間: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"]]