基本路线:
1.搭建环境/数据读入
2.数据分析
3.特征工程
4.建模调参
5.模型融合
异常处理:
- 通过箱线图(或 3-Sigma)分析删除异常值;
- BOX-COX 转换(处理有偏分布);
- 长尾截断;
特征筛选常用方法:
- 过滤式(filter):先对数据进行特征选择,然后在训练学习器,常见的方法有 Relief/方差选择发/相关系数法/卡方检验法/互信息法;
- 包裹式(wrapper):直接把最终将要使用的学习器的性能作为特征子集的评价准则,常见方法有 LVM(Las Vegas Wrapper) ;
- 嵌入式(embedding):结合过滤式和包裹式,学习器训练过程中自动进行了特征选择,常见的有 lasso 回归;
调参三种方法:
贪心
局部最优解
网格
def grid_search(command_dict, tmux_name='search'):
server = libtmux.Server()
sess = server.new_session(tmux_name)
for i, (name, command_) in enumerate(command_dict.items()):
if i == 0:
window = sess.windows[-1]
else:
window = sess.new_window