如果您有两个0和1类的数值目标,并且所有功能也是数值的,我应该编码目标吗?
我正在处理二进制分类问题,我的数据集包含数值功能,而目标类也是数值,我有两个类别0或1类 在这种情况下,在对数据集进行预处理时,我应该仔细研究数据编码步骤还是在这种情况下不需要?
I am working on a binary classification problem, my dataset contains numerical features and the target class as well is numerical where I have two classes either 0 or 1
in this case while preprocessing the dataset, should I go through the data encoding step or it is not necessary in this case??
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果目标变量已经编码,则不需要编码该目标变量。编码的目的是使您的机器学习模型能够解释数字。无论是{-1,1}还是{true,false}或{a,b},应用的编码都会在
0
和1
之间归一化。通过您的模型。参见Sklearn的You do not need to encode the target variable if it already is encoded. The point of encoding is for your machine learning model to be able to interpret the number. Whether it is a {-1,1} or {True, False} or {A,B}, the encoding applied will normalize it between
0
and1
to be digestible by your model. See sklearn's label encoder