worldbank / REaLTabFormer

A suite of auto-regressive and Seq2Seq (sequence-to-sequence) transformer models for tabular and relational synthetic data generation.
https://worldbank.github.io/REaLTabFormer/
MIT License
203 stars 23 forks source link

Use different join columns (parent_join_on, child_join_on) in relational model fit method. #27

Open echatzikyriakidis opened 1 year ago

echatzikyriakidis commented 1 year ago

Hi @avsolatorio!

I was wondering if it easy to support for relational model fit() different columns for joining the data. Something like pandas merge supports: (left_on, right_on):

DataFrame.merge(right, ..., left_on=None, right_on=None, ...)

Maybe you could add support for parent_join_on, child_join_on?

Currently, it supports only join_on:

child_model.fit(
    df=child_df,
    in_df=parent_df,
    join_on=join_on)

What do you think?