【Python学习笔记】——特征工程

目 录

参考:https://machinelearningmastery.com/discover-feature-engineering-how-to-engineer-features-and-how-to-get-good-at-it/

特征工程

什么是特征工程

  “feature engineering is another topic which doesn’t seem to merit any review papers or books, or even chapters in books, but it is absolutely vital to ML success. […] Much of the success of machine learning is actually success in engineering features that a learner can understand.”

— Scott Locklin, in “Neglected machine learning ideas

  在机器学习中,特征工程并不能算作是一个热点话题,甚至很少有一本机器学习的教材专门拿出一个章节来讲特征工程,但是它对于机器学习来说是至关重要的。在众多的机器学习模型中算法多么高深未必能取得好的结果,而获得高分的模型往往在特征工程上都做的更加出色。因为我们面对的数据并不像书中的数据那样完美的适合一个模型。我们需要从数据中得到更有用、更全面、更干净的信息。数据决定了学习的上限,而算法不过是不断地逼近这个上限。

  有很多因素可以影响学习的结果:模型的选择(LR?SVM?)、可获得的数据(samples? formatting? cleaning?)、特征的选择、对问题的理解(classification? regression?)以及评估的标准(RMSE? AUC?)等等。对于一个预测问题,我们想要得到最好的结果,这包括在模型中学得最好的结果,也包括获取用来训练模型的最好的数据,后面的工作就是特征工程。严格来说,特征工程就是从原始数据中获得能够更好的还原问题到可预测模型,并且在测试集上提高模型精度的特征。还原到程序中,特征工程就是如何来构建我们训练所要的 X X X

  “feature engineering is manually designing what the input x’s should be”

— Tomasz Malisiewicz, answer to “What is feature engineering?

  特征工程要解决的是如何把一个实际问题转化为可以进行建模的数据

  “you have to turn your inputs into things the algorithm can understand”

— Shayne Miel, answer to “What is the intuitive explanation of feature engineering in machine learning?

  特征工程要实现的是为建模提供最好的数据

  “…some machine learning projects succeed and some fail. What makes the difference? Easily the most important factor is the features used.”

— Pedro Domingos, in “A Few Useful Things to Know about Machine Learning

为什么特征工程很重要

  “Actually the success of all Machine Learning algorithms depends on how you present the data.”

— Mohammad Pezeshki, answer to “What are some general tips on feature selection and engineering that every data scientist should know?

  虽然已经说明了特征工程是很重要的,那么它重要在哪里,为什么如此重要呢?

增加了模型选择的灵活性

  更好的特征意味着我们在模型选择上有更多的余地,即使不是最优模型仍能获得好的结果,基于此,我们可以选择更简单、更快速、更易于维护的模型

使参数优化变得简单

  更好的特征意味着我们不必去追求最优的参数,即使不是最优的参数也能获得较好的结果。好的特征使得我们更加接近真实问题,更好的描述现有的数据。

得到更好的结果

  “The algorithms we used are very standard for Kagglers. […] We spent most of our efforts in feature engineering.”

— Xavier Conort, on “Q&A with Xavier Conort” on winning the Flight Quest challenge on Kaggle

特征工程在机器学习中的步骤

  先来看一下一般特征工程具体是在哪个步骤做呢?

  一个普通的

  • 1
    点赞
  • 36
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值