Skip to content

Instantly share code, notes, and snippets.

@brinnaebent
Created June 30, 2020 01:44
Show Gist options
  • Save brinnaebent/5989ff3499265765d120acd76bba1b22 to your computer and use it in GitHub Desktop.
Save brinnaebent/5989ff3499265765d120acd76bba1b22 to your computer and use it in GitHub Desktop.
# Separate data for leave-one-person-out-cross-validation (LOOCV)
LOOCV_O = ids
data[idcolumn] = data[idcolumn].apply(str)
data_filtered = data[data[idcolumn] != LOOCV_O]
data_cv = data[data[idcolumn] == LOOCV_O]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment