Appendix O — chapter4.analysis.tug_results_processing
chapter4.analysis.tug_results_processing
Provides functions to process the raw results of the TUG test obtained by the developed system and the reference method.
Functions
Name | Description |
---|---|
check_status | Checks the status of the system’s generated results of a TUG execution. An execution is classified |
compute_errors_by_subject | Computes the error in milliseconds between the measures obtained by the systems and the reference measures. |
compute_rmse_by_subject | Computes the intra-subject RMSE between the systems’ and reference methods. |
extract_manual_results | Extracts the TUG results generated by the reference system. |
extract_system_results | Extracts the TUG results generated by the system. |
invalidate_executions | Invalidates TUG executions not considered as failures by the system but that were wrongly executed due to external factors. |
check_status
chapter4.analysis.tug_results_processing.check_status(row)
Checks the status of the system’s generated results of a TUG execution. An execution is classified as success
when all measures where obtained, partial_success
when the duration of the test was obtained but the measure of one or more subphases is missing, failure
when the duration of the test was not obtained.
Parameters
Name | Type | Description | Default |
---|---|---|---|
row |
pandas.Series |
Results of a TUG execution. | required |
Returns
Type | Description |
---|---|
str | The status of the execution. One of success , partial_success or failure . |
compute_errors_by_subject
chapter4.analysis.tug_results_processing.compute_errors_by_subject(systems_results, man_results)
Computes the error in milliseconds between the measures obtained by the systems and the reference measures.
Parameters
Name | Type | Description | Default |
---|---|---|---|
systems_results |
dict | Dict containing the results (values) generated by both system’s configurations: C1 and C2 (keys). |
required |
man_results |
pandas.DataFrame |
DataFrame containing the reference measures. | required |
Returns
Type | Description |
---|---|
pandas.DataFrame |
DataFrame containing the errors between systems’ and reference measures. |
compute_rmse_by_subject
chapter4.analysis.tug_results_processing.compute_rmse_by_subject(errors_df)
Computes the intra-subject RMSE between the systems’ and reference methods.
Parameters
Name | Type | Description | Default |
---|---|---|---|
errors_df |
pandas.DataFrame |
DataFrame containing the error in ms of the system measures and the reference method for all subjects. | required |
Returns
Type | Description |
---|---|
pandas.DataFrame |
DataFrame containing the intra-subject RMSE for each subject, system and measure. |
extract_manual_results
chapter4.analysis.tug_results_processing.extract_manual_results(subject, results_file)
Extracts the TUG results generated by the reference system.
Parameters
Name | Type | Description | Default |
---|---|---|---|
subject |
str | ID of the subject whose results are extracted. | required |
results_file |
str | Path of the file containing the results. | required |
Returns
Type | Description |
---|---|
pandas.DataFrame |
DataFrame containing the extracted results. |
extract_system_results
chapter4.analysis.tug_results_processing.extract_system_results(subject, results_file)
Extracts the TUG results generated by the system.
Parameters
Name | Type | Description | Default |
---|---|---|---|
subject |
str | ID of the subject whose results are extracted. | required |
results_file |
str | Path of the file containing the results. | required |
Returns
Type | Description |
---|---|
pandas.DataFrame |
DataFrame containing the extracted results. |
invalidate_executions
chapter4.analysis.tug_results_processing.invalidate_executions(df, executions)
Invalidates TUG executions not considered as failures by the system but that were wrongly executed due to external factors.
Parameters
Name | Type | Description | Default |
---|---|---|---|
df |
pandas.DataFrame |
DataFrame containing the TUG test system’s results. | required |
executions |
dict | Dict indicating which executions (values) of which subject (key) have to be invalidated. | required |
Returns
Type | Description |
---|---|
pandas.DataFrame |
DataFrame with the specified samples invalidated. |