人类活动识别数据集:合并传感器数据后是否可丢弃activity_gur列?
activity_gur Column After Merging Accelerometer and Gyroscope Data for HAR? Great question—this is a super common scenario when working with multi-sensor human activity recognition datasets, so let’s break down whether dropping activity_gur makes sense, depending on your data’s context:
First, Clarify the Origin of the Two Activity Columns
The key here is understanding why you have two activity labels (activity and activity_gur) in the first place. Let’s cover the most common cases:
Case 1: The Two Columns Are Redundant (Same Annotation for the Same Sample)
If both activity and activity_gur refer to the same time window/sample and are either:
- The same annotator’s duplicate label, or
- Two annotators who agreed almost entirely on the activity labels
Then dropping activity_gur is totally reasonable. First, do a quick check to confirm consistency:
# Check how often the two labels match print(df[['activity', 'activity_gur']].value_counts(normalize=True))
If the match rate is 95%+ (with minor discrepancies likely being annotation errors), you can safely keep one label (preferably the one documented as the "gold standard" if available) and drop the other.
Case 2: The Columns Are Separate Annotations (Different Sources/Reliability)
If activity is your primary, verified annotation (e.g., from a well-documented dataset’s gold standard) and activity_gur is a secondary or draft annotation, dropping activity_gur is also reasonable.
If both are valid annotations with meaningful differences, you might want to:
- Use a consensus label (e.g., only keep samples where both labels match)
- Or pick the annotation source you trust more, then discard the other. Either way, dropping
activity_guris acceptable if it’s not adding value to your task.
Case 3: The Columns Are Misaligned (Different Time/Samples)
This is the red flag scenario. If activity maps to accelerometer data and activity_gur maps to gyroscope data that wasn’t properly time-synced or matched to the same user/activity window, dropping activity_gur without fixing the alignment first is not reasonable.
First, validate your merge:
- Check if
idandtimevalues align perfectly between the original accelerometer and gyroscope datasets. - Look for rows where
activityandactivity_gurare drastically different (e.g., "walking" vs "sitting")—this usually points to a merge error.
Fix the alignment issue first, then decide if the labels are redundant or not.
Final Quick Recommendations
- Always check the dataset documentation: If it explicitly states one label is the primary annotation, go with that and drop the other.
- Do exploratory analysis: The value count check I mentioned earlier will quickly tell you if the labels are redundant.
- Align with your task goal: If your HAR model only needs one activity label per sample, keeping redundant labels adds unnecessary noise—so dropping
activity_guris the way to go.
内容的提问来源于stack exchange,提问作者redplanet

