I have a single dataframe and want to use featuretools for auto feature engineering part. I am able to do it with normalize entities function. code snippet is below:
es = ft.EntitySet(id = 'obs_data')
es = es.entity_from_dataframe(entity_id = 'obs', dataframe = X_train,
variable_types = variable_types, make_index = True, index = "Id")
for feat in interaction: # interaction columns are found using xgbfir
es = es.normalize_entity(base_entity_id='obs', new_entity_id=feat, index=feat)
features, feature_names = ft.dfs(entityset = es,
target_entity = 'obs',
max_depth = 2)
Its creating features, Now I want to do same thing for X_test. I read blogs on this and they are suggesting to combine X_train and X_test and then do the same process. suppose there are 5 obs in X_test and if i combine it with X_train, then each observation (from X_test) will have effect of other 4 observation (X_test) also, which is not a good idea. Anyone can suggest how to do feature engineering using featuretools for the new data?