Skip to content
This repository has been archived by the owner on May 3, 2023. It is now read-only.

Commit

Permalink
Merge pull request #120 from Aarhus-Psychiatry-Research/martbern/quar…
Browse files Browse the repository at this point in the history
…antine_on_move

application: Add quarantine on move
  • Loading branch information
MartinBernstorff authored Dec 16, 2022
2 parents d222de1 + 324e4a9 commit 1877324
Show file tree
Hide file tree
Showing 9 changed files with 350 additions and 244 deletions.
11 changes: 9 additions & 2 deletions src/application/t2d/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import wandb

from application.t2d.modules.specify_features import get_feature_specs
from application.t2d.modules.specify_features import FeatureSpecifier
from psycop_feature_generation.application_modules.describe_flattened_dataset import (
save_flattened_dataset_description_to_disk,
)
Expand All @@ -26,6 +26,9 @@
from psycop_feature_generation.application_modules.wandb_utils import (
wandb_alert_on_exception,
)
from psycop_feature_generation.loaders.raw.load_moves import (
load_move_into_rm_for_exclusion,
)
from psycop_feature_generation.loaders.raw.load_visits import (
physical_visits_to_psychiatry,
)
Expand All @@ -37,13 +40,17 @@
def main():
"""Main function for loading, generating and evaluating a flattened
dataset."""
feature_specs = get_feature_specs(project_info=project_info)
feature_specs = FeatureSpecifier(
project_info=project_info, min_set_for_debug=True
).get_feature_specs()

flattened_df = create_flattened_dataset(
feature_specs=feature_specs,
prediction_times_df=physical_visits_to_psychiatry(timestamps_only=True),
drop_pred_times_with_insufficient_look_distance=False,
project_info=project_info,
quarantine_df=load_move_into_rm_for_exclusion(),
quarantine_days=720,
)

split_and_save_dataset_to_disk(
Expand Down
Loading

0 comments on commit 1877324

Please sign in to comment.