Skip to content
This repository was archived by the owner on Sep 11, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion nowcasting_dataset/config/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ class Process(BaseModel):
),
)
split_method: split.SplitMethod = Field(
split.SplitMethod.DAY,
split.SplitMethod.DAY_RANDOM_TEST_DATE,
description=(
"The method used to split the t0 datetimes into train, validation and test sets."
),
Expand Down
2 changes: 1 addition & 1 deletion nowcasting_dataset/dataset/split/split.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class SplitName(Enum):
def split_data(
datetimes: Union[List[pd.Timestamp], pd.DatetimeIndex],
method: SplitMethod,
train_test_validation_split: Tuple[int] = (3, 1, 1),
train_test_validation_split: Tuple[int, int, int] = (3, 1, 1),
train_test_validation_specific: TrainValidationTestSpecific = (
default_train_test_validation_specific
),
Expand Down
9 changes: 8 additions & 1 deletion nowcasting_dataset/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,15 @@ def create_files_specifying_spatial_and_temporal_locations_of_each_example_if_ne
t0_datetimes = self.get_t0_datetimes_across_all_data_sources(
freq=self.config.process.t0_datetime_frequency
)
# TODO: move hard code values to config file #426
split_t0_datetimes = split.split_data(
datetimes=t0_datetimes, method=self.config.process.split_method
datetimes=t0_datetimes,
method=self.config.process.split_method,
train_test_validation_split=(3, 0, 1),
train_validation_test_datetime_split=[
pd.Timestamp("2020-01-01"),
pd.Timestamp("2021-01-01"),
],
)
for split_name, datetimes_for_split in split_t0_datetimes._asdict().items():
n_batches = self._get_n_batches_for_split_name(split_name)
Expand Down