公告:凡是在
2025 年 4 月 15 日前註冊使用 Earth Engine 的非商業專案,都必須
驗證非商業用途資格,才能繼續存取 Earth Engine。
ee.Classifier.setOutputMode
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
設定分類器的輸出格式。
如要查看各分類器支援的模式清單,請前往 https://developers.google.com/earth-engine/guides/classification。
用量 | 傳回 |
---|
Classifier.setOutputMode(mode) | 分類器 |
引數 | 類型 | 詳細資料 |
---|
this:classifier | 分類器 | 輸入分類器。 |
mode | 字串 | 輸出模式。下列任一項:
- CLASSIFICATION (預設):輸出內容為類別編號。
- REGRESSION:輸出內容是標準迴歸的結果。
- PROBABILITY:輸出結果是分類正確的機率。
- MULTIPROBABILITY:輸出陣列,其中每個類別的正確機率依觀察到的類別排序。
- RAW:輸出內容是分類程序的內部表示法陣列。例如多決策樹模型中的原始票數。
- RAW_REGRESSION:輸出內容是回歸程序的內部表示法陣列。例如多重迴歸樹的未經處理的預測結果。
|
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-25 (世界標準時間)。
[null,null,["上次更新時間:2025-07-25 (世界標準時間)。"],[[["\u003cp\u003eSets the output mode for a classifier, impacting how results are presented.\u003c/p\u003e\n"],["\u003cp\u003eOffers various output modes like CLASSIFICATION, REGRESSION, PROBABILITY, MULTIPROBABILITY, RAW, and RAW_REGRESSION, each providing different data representations.\u003c/p\u003e\n"],["\u003cp\u003eNot all classifiers support every output mode; CLASSIFICATION is the default.\u003c/p\u003e\n"],["\u003cp\u003eThe setOutputMode function takes a string argument representing the desired mode and returns the classifier instance.\u003c/p\u003e\n"]]],[],null,["# ee.Classifier.setOutputMode\n\nSets a classifier's output format.\n\n\u003cbr /\u003e\n\nRefer to https://developers.google.com/earth-engine/guides/classification for a list of supported modes for each classifier.\n\n| Usage | Returns |\n|----------------------------------|------------|\n| Classifier.setOutputMode`(mode)` | Classifier |\n\n| Argument | Type | Details |\n|--------------------|------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| this: `classifier` | Classifier | An input classifier. |\n| `mode` | String | The output mode. One of: - CLASSIFICATION (default): The output is the class number. - REGRESSION: The output is the result of standard regression. - PROBABILITY: The output is the probability that the classification is correct. - MULTIPROBABILITY: The output is an array of probabilities that each class is correct ordered by classes seen. - RAW: The output is an array of the internal representation of the classification process. For example, the raw votes in multi-decision tree models. - RAW_REGRESSION: The output is an array of the internal representation of the regression process. For example, the raw predictions of multiple regression trees. |"]]