【发布时间】:2020-09-06 18:35:37
【问题描述】:
我目前正在处理binary classification 任务,其中的类是imbalanced。
我有以下不同级别的categorical属性:
time_slot: 8 levels
product_type: 3 levels
state: 40 levels
due_day: 6 levels (Mon - Sat)
lead_time: numerical in days (0-100)
现在,我打算从三个算法开始:
Logistic Regression, Decision Tree and Random Forest
对于分类变量最好的编码策略,我感到很困惑?
LabelEncoder, OneHot, BinaryEncoding?
另外,我正在考虑为lead_time 创建垃圾箱
任何指针/提示都会很有用。
【问题讨论】:
-
看看一个热编码 (OHE) 将您的分类数据转换为您将能够提供给您的模型的特征
标签: python python-3.x pandas scikit-learn classification