Account for the case when there is no data for days with labels.

rapids
junos 2021-08-21 18:49:57 +02:00
parent f73f86486a
commit d19995385d
1 changed files with 3 additions and 2 deletions

View File

@ -171,9 +171,10 @@ class ModelValidation:
self.model = None
self.cv = None
self.y = y["NA"]
idx_common = X.index.intersection(y.index)
self.y = y.loc[idx_common, "NA"]
# TODO Handle the case of multiple labels.
self.X = X.loc[self.y.index]
self.X = X.loc[idx_common]
self.groups = self.y.index.get_level_values(group_variable)
self.cv_name = cv_name