Aarhus-Psychiatry-Research/psycop-common

feat: RegionalFilter can take classical split names (train/test/val)

Closed this issue · 1 comments

I imagine something like:

  • Renaming "regions_to_keep" to "splits_to_keep"
  • Adding "train, test, val" as options, while retaining west/midt/øst
  • Mapping train/test/val to the correct region within the class

https://github.com/Aarhus-Psychiatry-Research/psycop-common/blob/d34028a21f948e6419abbf24b775b2e3ce4bd290/psycop/common/model_training_v2/trainer/data/data_filters/geography.py#L16-L74

What do you think @HLasse?

This is actually already an option (or, well, should be very easy). The geography df has a "split" column which already maps øst=train, vest=val, midt=test. But yeah, probably a good idea to change the signature so it's similar to stratified by outcome ids!