USGS-R / river-dl

Deep learning model for predicting environmental variables on river systems
Creative Commons Zero v1.0 Universal
21 stars 15 forks source link

Small fixes to latest PR NA masking. #155

Closed SimonTopp closed 2 years ago

SimonTopp commented 2 years ago

Caught some small errors in the code that masks out the non-keep portion in pretraining that was added in #154. Errors were missed because it was only tested with fine-tuning. We were calling y_val_pre even though there is no validation in pre-training, and we were calling y_trn_obs.shape instead of y_trn_pre.shape

SimonTopp commented 2 years ago

Thanks @janetrbarclay! The naming difference is intentional, I could imagine scenarios where you want the offset and the keep_portion to be different. For example, if you wanted to test how different lengths of look back periods impacted results, you would keep the same offset but adjust the keep_portion. Also, we call it keep_portion for the predict arguments, so data prep is all offset, and then everything that has to do with prediction is keep_portion. Happy to chat more, but I'd vote to leave as is.