【问题标题】:How to select features from feature_def created through deep feature synthesis如何从通过深度特征合成创建的 feature_def 中选择特征
【发布时间】:2018-12-21 01:38:13
【问题描述】:

我正在使用深度特征合成来创建新特征。如何从 feature_def 中选择功能。

例如,我需要选择其中包含字符串“Age”的所有特征。 我尝试了以下代码,它给了我一个错误“'IdentityFeature'类型的参数不可迭代”

    feature_matrix, feature_defs = ft.dfs(entityset= es, target_entity= 'titanic', max_depth= 2)
    features = []
    for s in feature_defs:
      if 'Age' in s:
        features.append(s)

【问题讨论】:

    标签: featuretools


    【解决方案1】:

    您需要在特征定义上使用.get_name() 方法。例如,

    feature_matrix, feature_defs = ft.dfs(entityset= es, target_entity= 'titanic', max_depth= 2)
    features = []
    for s in feature_defs:
      if 'Age' in s.get_name():
        features.append(s)
    

    【讨论】:

      猜你喜欢
      • 2016-03-16
      • 1970-01-01
      • 1970-01-01
      • 2014-09-21
      • 2016-02-12
      • 1970-01-01
      • 1970-01-01
      • 2011-01-10
      • 2018-10-13
      相关资源
      最近更新 更多