【问题标题】:Featuretools categorical handlingFeaturetools 分类处理
【发布时间】:2019-02-27 00:32:03
【问题描述】:

Featuretools 提供处理分类变量的集成功能

variable_types={"product_id": ft.variable_types.Categorical} https://docs.featuretools.com/loading_data/using_entitysets.html

但是这些应该是 stringspandas.Category 类型以实现与 Featuretools 的最佳兼容性?

编辑

另外,是否需要手动指定所有列,如 https://github.com/Featuretools/predict-appointment-noshow/blob/master/Tutorial.ipynb 或者它们会从拟合 pandas 数据类型中自动推断出来

import featuretools.variable_types as vtypes
variable_types = {'gender': vtypes.Categorical,
                  'patient_id': vtypes.Categorical,
                  'age': vtypes.Ordinal,
                  'scholarship': vtypes.Boolean,
                  'hypertension': vtypes.Boolean,
                  'diabetes': vtypes.Boolean,
                  'alcoholism': vtypes.Boolean,
                  'handicap': vtypes.Boolean,
                  'no_show': vtypes.Boolean,
                  'sms_received': vtypes.Boolean}

【问题讨论】:

    标签: python pandas feature-extraction feature-engineering featuretools


    【解决方案1】:

    在将数据加载到 Featuretools 时,您应该使用 Pandas Category dtype。与使用字符串相比,这将显着节省内存使用量。

    加载数据时,您无需手动指定每个变量类型。如果未提供,Featuretools 将尝试从 Pandas dtype 推断它。

    【讨论】:

      猜你喜欢
      • 2019-02-27
      • 1970-01-01
      • 2022-01-18
      • 2015-06-05
      • 2018-01-22
      • 1970-01-01
      • 2023-03-22
      • 2016-03-24
      • 2020-06-11
      相关资源
      最近更新 更多