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

编程入门 行业动态 更新时间:2024-10-27 18:28:04

1、什么是Featuretools?

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

链接:https://www.featuretools/

2、安装

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

git clone https://github/featuretools/featuretools.git
cd featuretools
python setup.py install

通过pip安装,命令如下:

pip install featuretools

3、五分钟快速开始

1)首先导入相关包:

In [1]: import featuretools as ft

2)准备相关数据:

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)特征综合:

In [11]: feature_matrix_customers, features_defs = ft.dfs(entities=entities,
   ....:                                                  relationships=relationships,
   ....:                                                  target_entity="customers")

In [12]: feature_matrix_customers

更多推荐

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

本文发布于:2023-06-14 04:42:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1439106.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:特征   机器   工程   featuretools

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!