前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >机器学习特征提取 | 自动特征工程featuretools

机器学习特征提取 | 自动特征工程featuretools

作者头像
深度学习思考者
发布2018-01-02 20:35:28
1.6K0
发布2018-01-02 20:35:28
举报

1、什么是Featuretools?

为了能使框架普适,就像pandas用于数据准备或scikit-learn用于机器学习。

链接:https://www.featuretools.com/

这里写图片描述
这里写图片描述

2、安装

通过源码安装,代码如下:

代码语言:javascript
复制
git clone https://github.com/featuretools/featuretools.git
cd featuretools
python setup.py install

通过pip安装,命令如下:

代码语言:javascript
复制
pip install featuretools

3、五分钟快速开始

1)首先导入相关包:

代码语言:javascript
复制
In [1]: import featuretools as ft

2)准备相关数据:

代码语言:javascript
复制
In [2]: data = ft.demo.load_mock_customer()
In [3]: customers_df = data["customers"]
In [5]: sessions_df = data["sessions"]
In [7]: transactions_df = data["transactions"]
In [10]: relationships = [("sessions", "session_id", "transactions", "session_id"),
   ....:                  ("customers", "customer_id", "sessions", "customer_id")]

3)特征综合:

代码语言:javascript
复制
In [11]: feature_matrix_customers, features_defs = ft.dfs(entities=entities,
   ....:                                                  relationships=relationships,
   ....:                                                  target_entity="customers")

In [12]: feature_matrix_customers
本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2017年11月07日,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 1、什么是Featuretools?
  • 2、安装
  • 3、五分钟快速开始
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档