klarsen1 / MarketMatching

Other
131 stars 37 forks source link

How to Leave Out Dates from Training and Inference for Validation? #27

Closed sssiv93 closed 8 months ago

sssiv93 commented 1 year ago

Does MarketMatching allow you to select a post period start date when running inference? I would ideally like to use best_matches to identify some good control markets over a training period, and then test out whether the correlation still holds on a validation period. In order to do this, I need to leave out some dates between the matching period and the inference period. Is there a way to do this? Thank you.

klarsen1 commented 1 year ago

Yes and no.

The package allows you to choose your matching period using the start_match_period and end_match_period parameters. Then, when you do inference based on the markets you selected, you can see how well the model fits in the training period (that's what determines confidence for the post period inference). Checking market fits in the post period makes no sense for inference since the entire point of inference is to measure test versus control divergence (or lack of) in the post period.

If you want to use the package as a general matching utility (and not post period test versus control inference), it does not provide a holdout correlation feature, you'd have to export the markets and check that yourself.

Kim

On Sun, Jan 29, 2023 at 8:31 AM sssiv93 @.***> wrote:

Does MarketMatching allow you to select a post period start date when running inference? I would ideally like to use best_matches to identify some good control markets over a training period, and then test out whether the correlation still holds on a validation period. In order to do this, I need to leave out some dates between the matching period and the inference period. Is there a way to do this? Thank you.

— Reply to this email directly, view it on GitHub https://github.com/klarsen1/MarketMatching/issues/27, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACNKU5BOT65DPB4IF75IJGDWU2LODANCNFSM6AAAAAAUKKS45M . You are receiving this because you are subscribed to this thread.Message ID: @.***>

sssiv93 commented 1 year ago

Thank you, Kim. I wondered if I could ask you one more question (let me know if you would like me to create a new issue for this).

Do you have any guidance on what values are typically selected for the warping limit? I am trying to do some sensitivity analysis to observe how changing the parameters affects the estimated impact.

klarsen1 commented 1 year ago

I keep the limits narrow— like 2 or so. Unless you have shifting time series you don’t really even need warping tbh. In fact, you can set dtw_emphasis to zero

On Tue, Jan 31, 2023 at 1:54 PM sssiv93 @.***> wrote:

Thank you, Kim. I wondered if I could ask you one more question (let me know if you would like me to create a new issue for this).

Do you have any guidance on what values are typically selected for the warping limit? I am trying to do some sensitivity analysis to observe how changing the parameters affects the estimated impact.

— Reply to this email directly, view it on GitHub https://github.com/klarsen1/MarketMatching/issues/27#issuecomment-1411120002, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACNKU5CK7JB63MLFPHM3G6LWVGCZVANCNFSM6AAAAAAUKKS45M . You are receiving this because you commented.Message ID: @.***>

sssiv93 commented 1 year ago

Thanks!