公告:所有在
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(默认):输出是类别编号。
- 回归:输出是标准回归的结果。
- 概率:输出是分类正确的概率。
- MULTIPROBABILITY:输出是一个概率数组,表示每个类别正确的概率,按看到的类别排序。
- RAW:输出是分类流程的内部表示的数组。例如,多决策树模型中的原始投票结果。
- RAW_REGRESSION:输出是回归过程内部表示形式的数组。例如,多个回归树的原始预测结果。
|
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-25。
[null,null,["最后更新时间 (UTC):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. |"]]