-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #73 from biomarkersParkinson/feature_renaming_gait
Standardizing angle and velocity column names
- Loading branch information
Showing
10 changed files
with
656 additions
and
620 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
*.ipynb filter=nbstripout | ||
*.zpln filter=nbstripout | ||
*.ipynb diff=ipynb |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,171 +1,171 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"# Gait analysis" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"import os\n", | ||
"from paradigma.preprocessing_config import IMUPreprocessingConfig\n", | ||
"from paradigma.gait.gait_analysis import extract_gait_features_io, detect_gait_io, extract_arm_activity_features_io, detect_other_arm_activities_io, quantify_arm_swing_io\n", | ||
"from paradigma.gait.gait_analysis_config import GaitFeatureExtractionConfig, GaitDetectionConfig, ArmActivityFeatureExtractionConfig, FilteringGaitConfig, ArmSwingQuantificationConfig\n", | ||
"from paradigma.imu_preprocessing import preprocess_imu_data_io" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 8, | ||
"metadata": { | ||
"tags": [ | ||
"parameters" | ||
] | ||
}, | ||
"outputs": [], | ||
"source": [ | ||
"branch = 'gait'\n", | ||
"sensor = 'imu'\n", | ||
"\n", | ||
"path_to_data = '../../../tests/data'\n", | ||
"path_to_classifier = os.path.join(path_to_data, '0.classification', branch)\n", | ||
"path_to_sensor_data = os.path.join(path_to_data, '1.sensor_data', sensor)\n", | ||
"path_to_preprocessed_data = os.path.join(path_to_data, '2.preprocessed_data', sensor)\n", | ||
"path_to_extracted_features = os.path.join(path_to_data, '3.extracted_features', branch)\n", | ||
"path_to_predictions = os.path.join(path_to_data, '4.predictions', branch)\n", | ||
"path_to_quantification = os.path.join(path_to_data, '5.quantification', branch)\n", | ||
"\n", | ||
"# Cell has the tag 'parameters', so it won't overwrite the parameters when running the notebook in tests" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"## Preprocessing" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 5, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"config = IMUPreprocessingConfig()\n", | ||
"preprocess_imu_data_io(path_to_sensor_data, path_to_preprocessed_data, config)" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"## Extract gait features" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 6, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"config = GaitFeatureExtractionConfig()\n", | ||
"extract_gait_features_io(path_to_preprocessed_data, path_to_extracted_features, config)" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"## Detect gait" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 10, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"config = GaitDetectionConfig()\n", | ||
"detect_gait_io(path_to_extracted_features, path_to_predictions, path_to_classifier, config)" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"## Extract arm actvitiy features" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 17, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"config = ArmActivityFeatureExtractionConfig()\n", | ||
"extract_arm_activity_features_io(path_to_preprocessed_data, path_to_extracted_features, config)" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"## Filter gait" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 18, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"config = FilteringGaitConfig()\n", | ||
"detect_other_arm_activities_io(path_to_extracted_features, path_to_predictions, path_to_classifier, config)" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"## Quantify arm swing" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 20, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"config = ArmSwingQuantificationConfig()\n", | ||
"quantify_arm_swing_io(path_to_extracted_features, path_to_predictions, path_to_quantification, config)" | ||
] | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "paradigma-Fn6RLG4_-py3.11", | ||
"language": "python", | ||
"name": "python3" | ||
}, | ||
"language_info": { | ||
"codemirror_mode": { | ||
"name": "ipython", | ||
"version": 3 | ||
}, | ||
"file_extension": ".py", | ||
"mimetype": "text/x-python", | ||
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython3", | ||
"version": "3.11.5" | ||
} | ||
"cells": [ | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"# Gait analysis" | ||
] | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 2 | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"import os\n", | ||
"from paradigma.preprocessing_config import IMUPreprocessingConfig\n", | ||
"from paradigma.gait.gait_analysis import extract_gait_features_io, detect_gait_io, extract_arm_activity_features_io, detect_other_arm_activities_io, quantify_arm_swing_io\n", | ||
"from paradigma.gait.gait_analysis_config import GaitFeatureExtractionConfig, GaitDetectionConfig, ArmActivityFeatureExtractionConfig, FilteringGaitConfig, ArmSwingQuantificationConfig\n", | ||
"from paradigma.imu_preprocessing import preprocess_imu_data_io" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": { | ||
"tags": [ | ||
"parameters" | ||
] | ||
}, | ||
"outputs": [], | ||
"source": [ | ||
"branch = 'gait'\n", | ||
"sensor = 'imu'\n", | ||
"\n", | ||
"path_to_data = '../../../tests/data'\n", | ||
"path_to_classifier = os.path.join(path_to_data, '0.classification', branch)\n", | ||
"path_to_sensor_data = os.path.join(path_to_data, '1.sensor_data', sensor)\n", | ||
"path_to_preprocessed_data = os.path.join(path_to_data, '2.preprocessed_data', sensor)\n", | ||
"path_to_extracted_features = os.path.join(path_to_data, '3.extracted_features', branch)\n", | ||
"path_to_predictions = os.path.join(path_to_data, '4.predictions', branch)\n", | ||
"path_to_quantification = os.path.join(path_to_data, '5.quantification', branch)\n", | ||
"\n", | ||
"# Cell has the tag 'parameters', so it won't overwrite the parameters when running the notebook in tests" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"## Preprocessing" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"config = IMUPreprocessingConfig()\n", | ||
"preprocess_imu_data_io(path_to_sensor_data, path_to_preprocessed_data, config)" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"## Extract gait features" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"config = GaitFeatureExtractionConfig()\n", | ||
"extract_gait_features_io(path_to_preprocessed_data, path_to_extracted_features, config)" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"## Detect gait" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"config = GaitDetectionConfig()\n", | ||
"detect_gait_io(path_to_extracted_features, path_to_predictions, path_to_classifier, config)" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"## Extract arm actvitiy features" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"config = ArmActivityFeatureExtractionConfig()\n", | ||
"extract_arm_activity_features_io(path_to_preprocessed_data, path_to_extracted_features, config)" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"## Filter gait" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"config = FilteringGaitConfig()\n", | ||
"detect_other_arm_activities_io(path_to_extracted_features, path_to_predictions, path_to_classifier, config)" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"## Quantify arm swing" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"config = ArmSwingQuantificationConfig()\n", | ||
"quantify_arm_swing_io(path_to_extracted_features, path_to_predictions, path_to_quantification, config)" | ||
] | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "paradigma-Fn6RLG4_-py3.11", | ||
"language": "python", | ||
"name": "python3" | ||
}, | ||
"language_info": { | ||
"codemirror_mode": { | ||
"name": "ipython", | ||
"version": 3 | ||
}, | ||
"file_extension": ".py", | ||
"mimetype": "text/x-python", | ||
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython3", | ||
"version": "3.11.5" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 2 | ||
} |
Oops, something went wrong.