Task Definitions¶
Comprehensive guide to the three-level task classification system for locomotion datasets.
Quick Navigation¶
Walking Tasks: Level • Incline • Decline
Stair Tasks: Ascent • Descent
Dynamic Tasks: Running • Jumping
Functional Tasks: Sit to Stand • Squats
Three-Level Task Classification System¶
Our data standard uses a hierarchical system to organize task information across three required columns:
task
- Biomechanical category for grouping similar activitiestask_id
- Specific variant with primary distinguishing parametertask_info
- Detailed metadata in parseable key:value format
This system enables:
- Efficient filtering by biomechanical category (task
)
- Quick selection of specific conditions (task_id
)
- Access to detailed experimental parameters (task_info
)
Data Storage Format¶
Column Requirements¶
All phase-indexed and time-indexed datasets must include these columns:
Column | Type | Description | Example |
---|---|---|---|
task |
string | Biomechanical category | "incline_walking" |
task_id |
string | Primary variant identifier | "incline_10deg" |
task_info |
string | Metadata in key:value format | "incline_deg:10,speed_m_s:1.2" |
Task Info Format Specification¶
Format: "key1:value1,key2:value2,key3:value3"
Rules:
- Keys contain units in the name (e.g., speed_m_s
not speed
)
- Values are primitives only (float, int, boolean, string)
- No spaces around colons or commas
- Boolean values: true
or false
(lowercase)
- Missing values: omit the key entirely
Type Conversion:
- Numbers without decimals → integer
- Numbers with decimals → float
- true
/false
→ boolean
- Everything else → string
Task Reference¶
Complete documentation for each standardized task type.
Quick Reference Table¶
Task | Task ID Examples | Primary Use |
---|---|---|
level_walking |
level |
Baseline gait analysis |
incline_walking |
incline_5deg , incline_10deg |
Uphill locomotion |
decline_walking |
decline_5deg , decline_10deg |
Downhill locomotion |
stair_ascent |
stair_ascent |
Stair climbing analysis |
stair_descent |
stair_descent |
Stair descent analysis |
run |
run |
Running gait |
jump |
jump |
Jumping mechanics |
sit_to_stand |
sit_to_stand |
Functional mobility |
squats |
squats |
Exercise analysis |
Level Walking¶
Description: Walking on level ground (0° incline)
Task: level_walking
Task ID: level
Common Metadata:
Key | Type | Description | Typical Values |
---|---|---|---|
speed_m_s |
float | Walking speed in m/s | 0.8 - 1.8 |
treadmill |
boolean | Treadmill vs overground | true/false |
overground |
boolean | Overground vs treadmill | true/false |
self_selected |
boolean | Self-selected pace | true/false |
Example: "speed_m_s:1.2,treadmill:true"
Incline Walking¶
Description: Walking uphill on positive incline
Task: incline_walking
Task ID: incline_5deg
, incline_10deg
, incline_15deg
, etc.
Common Metadata:
Key | Type | Description | Typical Values |
---|---|---|---|
incline_deg |
float | Incline angle (positive) | 5, 10, 15 |
speed_m_s |
float | Walking speed in m/s | 0.6 - 1.5 |
treadmill |
boolean | Treadmill vs ramp | true/false |
Example: "incline_deg:10,speed_m_s:1.0,treadmill:true"
Decline Walking¶
Description: Walking downhill on negative incline
Task: decline_walking
Task ID: decline_5deg
, decline_10deg
, decline_15deg
, etc.
Common Metadata:
Key | Type | Description | Typical Values |
---|---|---|---|
incline_deg |
float | Decline angle (negative) | -5, -10, -15 |
speed_m_s |
float | Walking speed in m/s | 0.6 - 1.5 |
treadmill |
boolean | Treadmill vs ramp | true/false |
Example: "incline_deg:-10,speed_m_s:0.8,treadmill:true"
Stair Ascent¶
Description: Walking up stairs
Task: stair_ascent
Task ID: stair_ascent
Common Metadata:
Key | Type | Description | Typical Values |
---|---|---|---|
steps |
int | Number of steps | 4, 8, 12 |
height_m |
float | Step height in meters | 0.15 - 0.20 |
depth_m |
float | Step depth in meters | 0.25 - 0.30 |
speed_m_s |
float | Ascent speed if measured | 0.4 - 0.8 |
handrail |
boolean | Handrail availability/use | true/false |
step_over_step |
boolean | Reciprocal gait pattern | true/false |
Example: "steps:8,height_m:0.17,handrail:false,step_over_step:true"
Stair Descent¶
Description: Walking down stairs
Task: stair_descent
Task ID: stair_descent
Common Metadata:
Key | Type | Description | Typical Values |
---|---|---|---|
steps |
int | Number of steps | 4, 8, 12 |
height_m |
float | Step height in meters | 0.15 - 0.20 |
depth_m |
float | Step depth in meters | 0.25 - 0.30 |
speed_m_s |
float | Descent speed if measured | 0.3 - 0.7 |
handrail |
boolean | Handrail availability/use | true/false |
step_over_step |
boolean | Reciprocal gait pattern | true/false |
Example: "steps:8,height_m:0.17,handrail:true,step_over_step:true"
Running¶
Description: Running or jogging locomotion
Task: run
Task ID: run
Common Metadata:
Key | Type | Description | Typical Values |
---|---|---|---|
speed_m_s |
float | Running speed in m/s | 2.0 - 5.0 |
treadmill |
boolean | Treadmill vs overground | true/false |
incline_deg |
float | Incline if applicable | -5 to 15 |
Example: "speed_m_s:3.0,treadmill:true,incline_deg:0"
Jumping¶
Description: Various jumping activities
Task: jump
Task ID: jump
Common Metadata:
Key | Type | Description | Typical Values |
---|---|---|---|
type |
string | Jump type | "vertical", "broad", "drop", "squat" |
height_m |
float | Jump or drop height | 0.2 - 0.6 |
distance_m |
float | Horizontal distance (broad jump) | 1.0 - 2.5 |
repetitions |
int | Number of jumps | 1, 3, 5 |
bilateral |
boolean | Two-leg vs single-leg | true/false |
Example: "type:vertical,height_m:0.3,repetitions:1,bilateral:true"
Sit to Stand¶
Description: Rising from seated position
Task: sit_to_stand
Task ID: sit_to_stand
Common Metadata:
Key | Type | Description | Typical Values |
---|---|---|---|
repetitions |
int | Number of repetitions | 1, 5, 10 |
chair_height_m |
float | Seat height in meters | 0.40 - 0.50 |
arms_used |
boolean | Whether arms were used | true/false |
speed |
string | Movement speed | "normal", "fast", "slow" |
Example: "repetitions:5,chair_height_m:0.45,arms_used:false,speed:normal"
Squats¶
Description: Squatting exercise motion
Task: squats
Task ID: squats
Common Metadata:
Key | Type | Description | Typical Values |
---|---|---|---|
repetitions |
int | Number of squats | 5, 10, 15 |
depth |
string | Squat depth | "partial", "parallel", "full" |
load_kg |
float | Additional weight if any | 0 - 50 |
tempo |
string | Movement tempo | "normal", "slow", "explosive" |
Example: "repetitions:10,depth:parallel,load_kg:0,tempo:normal"
Usage Examples¶
Python Implementation¶
from user_libs.python.locomotion_data import LocomotionData
# Load dataset
data = LocomotionData('converted_datasets/dataset_phase.parquet')
# Parse task_info string into dictionary
info = data.parse_task_info("incline_deg:10,speed_m_s:1.2,treadmill:true")
# Returns: {'incline_deg': 10, 'speed_m_s': 1.2, 'treadmill': True}
# Filter by specific task_id
incline_10_data = data.filter_by_task_id('incline_10deg')
# Get specific metadata value for a subject-task combination
speed = data.get_task_metadata('SUB01', 'incline_walking', 'speed_m_s')
# Returns: 1.2
# Find all unique task_ids in dataset
task_ids = data.df['task_id'].unique()
MATLAB Implementation¶
% Load parquet file
data = parquetread('dataset_phase.parquet');
% Filter by task
incline_data = data(strcmp(data.task, 'incline_walking'), :);
% Parse task_info (simple approach)
task_info_str = incline_data.task_info{1};
% Parse "incline_deg:10,speed_m_s:1.2" into struct
pairs = strsplit(task_info_str, ',');
for i = 1:length(pairs)
kv = strsplit(pairs{i}, ':');
metadata.(kv{1}) = str2double(kv{2});
end
Implementation Notes¶
For Dataset Converters¶
- Map native task names to our standard task categories
- Extract primary parameter for task_id (e.g., incline angle)
- Format metadata as comma-separated key:value pairs
- Ensure consistency - same task should have same task_id format
For Data Users¶
- Use task for broad filtering - get all walking data regardless of incline
- Use task_id for specific conditions - get only 10° incline walking
- Parse task_info for detailed analysis - extract exact speeds, dimensions
- Handle missing metadata gracefully - not all datasets have all parameters
Standard Compliance¶
- All three columns (task, task_id, task_info) are required
- Use exact task names from this reference
- Follow the key:value format strictly for parsing compatibility
- Document any dataset-specific metadata keys
Future Extensions¶
Additional tasks can be added following this pattern:
1. Define the biomechanical category (task
)
2. Identify the primary distinguishing parameter (task_id
)
3. Document common metadata keys for task_info
4. Update converters to map to the new task
For questions about task classification or to propose new task types, see the Contributing Guide.