Skip to content

Instantly share code, notes, and snippets.

@robotenique
Created May 19, 2019 22:46
Show Gist options
  • Save robotenique/96e2b802ebc89dd8ee384c8e9b65a160 to your computer and use it in GitHub Desktop.
Save robotenique/96e2b802ebc89dd8ee384c8e9b65a160 to your computer and use it in GitHub Desktop.
from fklearn.preprocessing.splitting import space_time_split_dataset
train_set, intime_outspace_hdout, outime_inspace_hdout, outime_outspace_hdout = \
space_time_split_dataset(df,
train_start_date="2016-12-31",
train_end_date="2017-01-10",
holdout_end_date="2017-02-13",
split_seed=42,
space_holdout_percentage=0.2,
space_column="username",
time_column="publication_date")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment