Created
January 14, 2018 12:51
-
-
Save sagarhowal/72ebe8737f772dfd284410ffe0c6490c 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
target_map = { | |
1.: 'walking', | |
2.: 'climbing_upstairs', | |
3.: 'climbing_downstairs', | |
4.: 'sitting', | |
5.: 'standing', | |
6.: 'laying' | |
} | |
# Use the same labels used in the experiment | |
data = data.filter_by(target_map.keys(), 'activity_id') | |
data['activity'] = data['activity_id'].apply(lambda x: target_map[x]) | |
data = data.remove_column('activity_id') | |
data.save('hapt_data.sframe') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment