Using MBCn Algorithm in Cross-Validation Mode #1937
-
Setup InformationXclim version: 0.52.0 ContextHi all, I'm trying to implement the MBCn algorithm in a cross-validation framework. Specifically, I want to split my historical simulation data into two parts: a training period and a validation period. I've decided to use odd-numbered years for training the algorithm and then adjust the even-numbered years based on the calculated adjustment factors from the training data. To evaluate the performance of MBCn for simultaneously bias-correcting surface temperature and precipitation, I created six test cases. However, I've encountered differences between the results that I can't fully explain. Test Cases Test 2 Test 3 Test 4 Test 5 Test 6 Results
It seems that the MBCn.adjust function fails because the application time series is shorter than the training time series. Could this be a limitation of the algorithm? Should this restriction be maintained, or is there a workaround?
Conclusion I would appreciate any insights or recommendations on how to address these differences. Thanks in advance for your help! Best regards, Steps To ReproduceTo reproduce my tests: https://cloud.meteo.be/s/egKyBbdgaBFxE4d |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Any update on this? |
Beta Was this translation helpful? Give feedback.
-
Sorry for not answering earlier! When implementing sdba I don't think we ever considered the possibility of having holes in the time dimension. Even more so in the current version of
One thing you can try would be to remove the years but re-generate a "synthetic" time coordinate so that there are no holes in the end ? For exemple, for data from 1976 to 2005. In sample 1, drop the even years and then patch the time coordinate with something going from 1976 to 1990. Same thing with sample 2, but dropping the odd years. Your discussion made us realize that this was may be not communicated correctly in the docstring, we should change that. My colleague @coxipi is working on a version that relaxes some of these requirements, but the performance is still not there. MBCn is complex and achieving a balance of generality (that would allow to do funky things like you are trying to do) and performance (so that it can be used with real data) is hard. Hope this helps! |
Beta Was this translation helpful? Give feedback.
Sorry for not answering earlier!
When implementing sdba I don't think we ever considered the possibility of having holes in the time dimension. Even more so in the current version of
MBCn
where it does very low level things with the time dimension in order to improve performance. Thus for the time being, there are very strict requirements on the time coordinates:ref
,hist
andsim
must be the same length, in the same uniform calendar (noleap
,all_leap
or360_day
) and (if usinggroup=time.dayofyear
), start on the same calendar date.One thing you can try would be to remove the years but re-generate a "synthetic" time coordinate so that there are no holes in the end ? For exemple, for data …