Created
January 7, 2014 18:55
-
-
Save aficionado/8304590 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Dataset with historical data | |
dataset = ‘dataset/52cb5ac7035d072695000bc6’ | |
# Source data of day i | |
source_day_i = api.create_source(“day-i.csv”) | |
dataset_day_i = api.create_dataset(source_day_i) | |
# Test for covariate shift | |
if not detect_shfit(dataset, dataset_day_i, | |
training_sample_size, daily_data_sample_size, trials): | |
# Merge new data, keep previous model | |
dataset = api.create_dataset([dataset, dataset_day_i]) | |
else: | |
# Take further actions e.g., update model or ensemble | |
raise PotentialShiftDetected |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment