def test_makes_numtrue(es): dfs = DeepFeatureSynthesis(target_entity_id='sessions', entityset=es, agg_primitives=[NumTrue], trans_primitives=[]) features = dfs.build_features() assert feature_with_name(features, 'customers.NUM_TRUE(log.purchased)') assert feature_with_name(features, 'NUM_TRUE(log.purchased)')
def test_makes_count(es): dfs = DeepFeatureSynthesis(target_entity_id='sessions', entityset=es, agg_primitives=[Count], trans_primitives=[]) features = dfs.build_features() assert feature_with_name(features, 'device_type') assert feature_with_name(features, 'customer_id') assert feature_with_name(features, u'customers.région_id') assert feature_with_name(features, 'customers.age') assert feature_with_name(features, 'COUNT(log)') assert feature_with_name(features, 'customers.COUNT(sessions)') assert feature_with_name(features, u'customers.régions.language') assert feature_with_name(features, 'customers.COUNT(log)')