xgboost 中可能的特征类型是什么?
What are the possible feature types in xgboost?
在 xgboost for python 的文档页面上,我们看到 feature_types
https://xgboost.readthedocs.io/en/latest/python/python_api.html 参数,但不知道可能的值是什么。
文档真的很糟糕。
feature_types
的可能值是多少?
如您所说,文档似乎很差,searching through the XGBoost source code on Github 提供了一些显示这些选项的测试:
- 整数
- 浮动
- q: 定量
- i: 指标
虽然很难弄清楚这些是什么意思,但其他一些网站列出了一些附加信息:
- 我:“i means this feature is binary indicator feature”
- 问:“means this feature is a quantitative value, such as age, time, can be missing”
- 整数:“means this feature is integer value (when int is hinted, the decision boundary will be integer)”
Link: .
在 XGBoosts core.py 代码中,您还可以找到关于类型的注释:
# use quantitative as default
# {'q': quantitative, 'i': indicator}
看看 XGBoost 代码,从它的其余部分开始,类型解析进入了底层的基于 c 的后端代码,所以这仍然是一个黑盒子,除非你想去探索它..: )
在 xgboost for python 的文档页面上,我们看到 feature_types
https://xgboost.readthedocs.io/en/latest/python/python_api.html 参数,但不知道可能的值是什么。
文档真的很糟糕。
feature_types
的可能值是多少?
如您所说,文档似乎很差,searching through the XGBoost source code on Github 提供了一些显示这些选项的测试:
- 整数
- 浮动
- q: 定量
- i: 指标
虽然很难弄清楚这些是什么意思,但其他一些网站列出了一些附加信息:
- 我:“i means this feature is binary indicator feature”
- 问:“means this feature is a quantitative value, such as age, time, can be missing”
- 整数:“means this feature is integer value (when int is hinted, the decision boundary will be integer)”
Link:
在 XGBoosts core.py 代码中,您还可以找到关于类型的注释:
# use quantitative as default
# {'q': quantitative, 'i': indicator}
看看 XGBoost 代码,从它的其余部分开始,类型解析进入了底层的基于 c 的后端代码,所以这仍然是一个黑盒子,除非你想去探索它..: )