Account for the case when there is no data for days with labels.
parent
f73f86486a
commit
d19995385d
|
@ -171,9 +171,10 @@ class ModelValidation:
|
||||||
self.model = None
|
self.model = None
|
||||||
self.cv = 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.
|
# 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.groups = self.y.index.get_level_values(group_variable)
|
||||||
|
|
||||||
self.cv_name = cv_name
|
self.cv_name = cv_name
|
||||||
|
|
Loading…
Reference in New Issue