Feature Engineering for Machine Learning 机器学习中的特征工程(一)

本系列的博客是《Feature Engineering for Machine Learning》这本书的整理及学习,如果有出错的地方麻烦各位指正。英文版参考的是2018年4月出版的,链接是Feature Engineering for Machine Learning。全书一共有九章,所以初步打算写九篇文章。原书所配套的代码可以在https://github.com/alicezheng/feature-engineering-book上找到
(1). The Machine Learning Pipeline
(2). Fancy Tricks with Simple Numbers
(3). Text Data: Flattening, Filtering, and Chunking
(4). The Effects of Feature Scaling: From Bag-of-Words to Tf-idf
(5). Categorical Variables: Counting Eggs in the Age of Robotic Chickens
(6). Dimensionality Reduction: Squashing the Data Pancake with PCA
(7). Nonlinear Featurization via K-Means Model Stacking
(8). Automating the Featurizer: Image Feature Extraction and Deep Learning
(9). Back to the Feature: Building an Academic Paper Recommender

首先看第一章:The Machine Learning Pipeline。pipeline可以翻译成管道或者流水线,是指数据在机器学习过程中像流水线一样从一个过程到另一个过程,比如sklearn中的pipeline。

from sklearn.pipeline import Pipeline
 
pipe_lr = Pipeline([('sc', StandardScaler()),
                    ('pca', PCA(n_components=2)),
                    ('clf', LogisticRegression(random_state=1))
                    ])
pipe_lr.fit(X_train, y_train)

首先对数据做了一个标准化,其次是PCA降维,最后是分类。

第一章目录
(1) Data
(2) Tasks
(3) Models
(4) Features
(5) Model Evaluation
data和task都是简单的一些概念。
model是和数据有关的,比如一个预测股票价格的模型可能会对一个公司的历史收入,股票的历史价格建模。但原始数据通常不是数值型的,所以需要特征来做原始数据和模型之间的桥梁。
特征就是原始数据的数值表示。特征工程是在给定数据,模型,任务的情况下给出最合适的特征。
特征工程在一个机器学习过程中的位置

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值