私は機能ツールを初めて使用し、複数の機能を使用して生成されたエンティティ セットに興味深い値を追加できるかどうか、およびその方法を理解しようとしています。
たとえば、顧客とトランザクションの 2 つのエンティティを含むエンティティ セットがあります。取引は借方または貸方 (c_d) であり、さまざまな支出カテゴリ (tran_category) (レストラン、衣料品、食料品など) で発生する可能性があります。
これまでのところ、これらの機能のいずれかに対して興味深い値を作成できますが、それらの組み合わせからは作成できません。
import featuretools as ft
x = ft.EntitySet()
x.entity_from_dataframe(entity_id = 'customers', dataframe = customer_ids, index = cust_id)
x.entity_from_dataframe(entity_id = 'transactions', dataframe = transactions, index = tran_id, time_index = 'transaction_date')
x_rel = ft.Relationship(x['parties']['cust_id'], x['transactions']['cust_id])
x.add_relationship(x_rel)
x['transactions']['d_c'].interesting_values = ['D', 'C']
x['transactions']['tran_category'].interesting_values = ['restaurants', 'clothing', 'groceries']
c_d と tran_category の値を組み合わせた興味深い値を追加するにはどうすればよいですか? (レストランのデビット、食料品のクレジット、衣類のデビットなど)。目標は、これらの興味深い値を使用して、トランザクション金額、トランザクション間の時間などを where_primitives を使用して集計することです。
feature_matrix, feature_defs = ft.dfs(entityset = x, target_entity = 'customers', agg_primitives = list_of_agg_primitives, where_primitives = list_of_where_primitives, trans_primitives = list_of_trans_primitives, max_depth = 3)