Skip to content

Commit

Permalink
Add train and test example frequency [Resolves #148]
Browse files Browse the repository at this point in the history
  • Loading branch information
thcrock committed May 2, 2017
1 parent 84ac133 commit b47bb4c
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
12 changes: 7 additions & 5 deletions example_experiment_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,14 @@ temporal_config:
beginning_of_time: '1995-01-01' # earliest date included in features
modeling_start_time: '2012-01-01' # earliest date in any model
modeling_end_time: '2015-01-01' # all dates in any model are < this date
update_window: '6m' # how frequently to retrain models
update_window: '6month' # how frequently to retrain models
look_back_durations: # length of time included in a model
- '6m'
- '3m'
test_durations: ['1m', '2m']
prediction_frequency: '1d' # per test set how often to generate predictions
- '6month'
- '3month'
train_example_frequency: '1day' # time between rows for same entity in train matrix
test_example_frequency: '3month' # time between rows for same entity in test matrix
test_durations: ['1month', '2month']
prediction_frequency: '1day' # per test set how often to generate predictions

# LABEL GENERATION
# Information needed to generate labels
Expand Down
4 changes: 4 additions & 0 deletions tests/test_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,8 @@ def simple_pipeline_test(pipeline_class):
'update_window': '1y',
'prediction_window': '6months',
'look_back_durations': ['6months'],
'train_example_frequency': '1day',
'test_example_frequency': '3months',
'test_durations': ['1months'],
'prediction_frequency': '1d'
}
Expand Down Expand Up @@ -241,6 +243,8 @@ def reuse_pipeline_test(pipeline_class):
'update_window': '1y',
'prediction_window': '6months',
'look_back_durations': ['6months'],
'train_example_frequency': '1day',
'test_example_frequency': '3months',
'test_durations': ['1months'],
'prediction_frequency': '1d'
}
Expand Down
2 changes: 2 additions & 0 deletions triage/pipelines/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ def initialize_factories(self):
modeling_end_time=dt_from_str(split_config['modeling_end_time']),
update_window=split_config['update_window'],
look_back_durations=split_config['look_back_durations'],
train_example_frequency=split_config['train_example_frequency'],
test_example_frequency=split_config['test_example_frequency'],
test_durations=split_config['test_durations'],
)

Expand Down

0 comments on commit b47bb4c

Please sign in to comment.