User Tools

Site Tools


visual3d:documentation:pipeline:metric_commands:metric_root_mean_squared

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
visual3d:documentation:pipeline:metric_commands:metric_root_mean_squared [2024/06/19 12:51] sgrangervisual3d:documentation:pipeline:metric_commands:metric_root_mean_squared [2025/10/03 19:13] (current) – [Example: Joint Power RMS] wikisysop
Line 1: Line 1:
-{{||+====== Metric Root Mean Squared ======
  
-compute a root mean squared value of a signal as a metric.+====Overview====
  
-given data xi for i=1,2....n +The metric command **Root Mean Squared** can be used to compute a Root Mean Squared value of a signal as a metric. This can be helpful when determining the magnitude or intensity of a signal, like joint power.
-mean squared error= mse = sum(xi^2)/+
-root mean squared error= rms= sqrt(mse) ; +
-\\ +
-for example, compute the root mean squared value of the knee joint power from **start** to **end**+
  
-metricrootmeansquared.png+Given data Xi for i=1,2....n 
 +Mean Squared Error= MSE = sum(Xi^2)/
 +Root Mean Squared Error= RMS= Sqrt(MSE) ;
  
-|**metric_root_mean_squared**                                                                           |                                                                         | +The command can be found in the **Pipeline Workshop** under **Metric** 
-|**/signal_types=**                                                                                     |link_model_based                                                         | +=====Pipeline Command===== 
-|**/signal_names=**                                                                                     |right ankle power                                                        | +The syntax for the function is as follows:
-|**/signal_folder**                                                                                     |original                                                                 | +
-|**/signal_components=**                                                                                |x                                                                        | +
-|**/[[visual3d:documentation:c3d_signal_types:event_label_data_type#event_sequence|event_sequence]]=**  |start+end                                                                | +
-|**/[[visual3d:documentation:c3d_signal_types:event_label_data_type#exclude_events|exclude_events]]=**  |                                                                         | +
-|**/[[visual3d:documentation:pipeline:metric_commands:sequence_percent_start|sequence_percent_start]]=**|within the event sequence specify the beginning of the range as a percent| +
-|**/[[visual3d:documentation:pipeline:metric_commands:sequence_percent_start|sequence_percent_end]]=**  |within the event sequence specify the end of the range as a percent      | +
-|**/metric_name=**                                                                                      |right angle power rms                                                    | +
-|**/apply_as_suffix_to_signal_name=**                                                                   |false                                                                    | +
-|**/generate_mean_and_stddev=**                                                                         |false                                                                    | +
-|**/append_to_existing_values=**                                                                        |false                                                                    | +
-|**/append_to_existing_values=**                                                                        |false                                                                    | +
-|**;**                                                                                                  |                                                                         |+
  
 +<code>
 +Metric_Root_Mean_Squared
 +! /RESULT_METRIC_FOLDER=PROCESSED
 +/RESULT_METRIC_NAME=
 +! /APPLY_AS_SUFFIX_TO_SIGNAL_NAME=FALSE
 +/SIGNAL_TYPES=
 +! /SIGNAL_FOLDER=ORIGINAL
 +! /SIGNAL_NAMES=
 +! /COMPONENT_SEQUENCE=
 +/EVENT_SEQUENCE=
 +/EXCLUDE_EVENTS=
 +! /GENERATE_MEAN_AND_STDDEV=TRUE
 +! /GENERATE_MEAN_AND_STDDEV_ACROSS_SUBJECTS=FALSE
 +! /APPEND_TO_EXISTING_VALUES=FALSE
 +;
 +</code>
  
-}}+=====Command Parameters===== 
 + 
 +The following table shows the command parameters seen above and their descriptions: 
 + 
 +|**RESULT_METRIC_FOLDER**|**The name of the result signal folder**| 
 +|**RESULT_METRIC_NAME**|**The name of the result signal**| 
 +|**APPLY_AS_SUFFIX_TO_SIGNAL_NAME**|**Suffix to be applied to signals**| 
 +|**SIGNAL_TYPES**|**Type of signal being processed**| 
 +|**SIGNAL_FOLDER**|**Original location of signals**| 
 +|**SIGNAL_NAMES**|**Specify names of signals**| 
 +|**COMPONENT_SEQUENCE**|**Which component of the signal will be used for statistical analysis of the sequence.**| 
 +|**EVENT_SEQUENCE**|** A list of events (separated by "+" signs). For example, LHS+RTO**| 
 +|**EXCLUDE_EVENTS**|**This Event Sequence must not be during the sequence requested. For example, LTO_RHS**| 
 +|**GENERATE_MEAN_AND_STDDEV**|**(True or False)Generate the mean and standard deviation for all of the metrics created**| 
 +|**GENERATE_MEAN_AND_STDDEV_ACROSS_SUBJECTS**|**(True or False)Generate the mean and standard deviation across all subjects in trial**| 
 +|**APPEND_TO_EXISTING_VALUES**|**(True or False)Append this list of metrics to an existing metric of the same result name**| 
 + 
 +====Dialog==== 
 + 
 +The command can be edited in a text editor or in a dialog form. To edit in the dialog pop up form either click on the **Edit** button in the pipeline workshop or double-click on the pipeline command. The dialog is shown below. 
 + 
 +{{:MetricRootMeanSquared.png}} 
 + 
 +The dialog box allows you to assign values to the command parameters outlined above. 
 + 
 +====Example: Joint Power RMS==== 
 +For example, compute the root mean squared value of the Ankle Joint Power from **RHS** to **RTO** 
 + 
 +<code> 
 +Metric_Root_Mean_Squared 
 + /RESULT_METRIC_FOLDER=PROCESSED 
 +/RESULT_METRIC_NAME=RAnkle_RMS 
 +! /APPLY_AS_SUFFIX_TO_SIGNAL_NAME=FALSE 
 +/SIGNAL_TYPES=LINK_MODEL_BASED 
 +/SIGNAL_FOLDER=ORIGINAL 
 +/SIGNAL_NAMES=RAnklePower 
 +/COMPONENT_SEQUENCE=X 
 +/EVENT_SEQUENCE=RHS+RTO 
 +/EXCLUDE_EVENTS= 
 +! /GENERATE_MEAN_AND_STDDEV=TRUE 
 +! /GENERATE_MEAN_AND_STDDEV_ACROSS_SUBJECTS=FALSE 
 +! /APPEND_TO_EXISTING_VALUES=FALSE 
 +
 +</code> 
 + 
 +Results: 
 + 
 +{{:visual3d:documentation:pipeline:metric_commands:rankle_rms.png?600|}} 
 + 
 +====Example: RMS of Metric==== 
 +Here **Metric Root Mean Squared** is used along with **Metric Signal Value at Event** to find the RMS of the right ankle moment at heel strikes in a gait trial. 
 + 
 +First, define key gait events across files: 
 + 
 +<code> 
 +Automatic_Gait_Events 
 +! /FRAME_WINDOW=8 
 +! /USE_TPR=TRUE 
 +! /TPR_EVENT_INSTANCE=1 
 +
 +</code> 
 + 
 +Next, the right ankle moment at each heel strike is computed using **Metric Signal Value at Event** and the RMS of this metric is found for each trial: 
 + 
 +<code> 
 +Metric_Signal_Value_At_Event 
 +/SIGNAL_TYPES=LINK_MODEL_BASED 
 +/SIGNAL_FOLDER=ORIGINAL 
 +/SIGNAL_NAMES=RAnkleMoment 
 +! /RESULT_METRIC_FOLDER=PROCESSED 
 +/RESULT_METRIC_NAME=RAnkleMoment_HS 
 +! /APPLY_AS_SUFFIX_TO_SIGNAL_NAME=FALSE 
 +/SIGNAL_COMPONENTS=X 
 +! /COMPONENT_SEQUENCE= 
 +/EVENT_NAME=RHS 
 +! /EVENT_INSTANCE=0 
 +! /SCALE_FACTORS=1 
 +! /GENERATE_GLOBAL_MEAN_AND_STDDEV=TRUE 
 +! /GENERATE_LOCAL_MEAN_AND_STDDEV=TRUE 
 +! /APPEND_TO_EXISTING_VALUES=FALSE 
 +! /GENERATE_VECTOR_LENGTH_METRIC=FALSE 
 +! /RETAIN_NO_DATA_VALUES=FALSE 
 +
 + 
 +Metric_Root_Mean_Squared 
 +! /RESULT_METRIC_FOLDER=PROCESSED 
 +/RESULT_METRIC_NAME=RAnkelMoment_RMS 
 +! /APPLY_AS_SUFFIX_TO_SIGNAL_NAME=FALSE 
 +/SIGNAL_TYPES=METRIC 
 +/SIGNAL_FOLDER=PROCESSED 
 +/SIGNAL_NAMES=RAnkleMoment_HS 
 +! /COMPONENT_SEQUENCE= 
 +!/EVENT_SEQUENCE= 
 +/EXCLUDE_EVENTS= 
 +! /GENERATE_MEAN_AND_STDDEV=TRUE 
 +! /GENERATE_MEAN_AND_STDDEV_ACROSS_SUBJECTS=FALSE 
 +! /APPEND_TO_EXISTING_VALUES=FALSE 
 +
 +</code> 
 + 
 +Results: 
 + 
 +The resulting metrics can be found in the **METRIC:PROCESSED** folder. 
 + 
 +{{:visual3d:documentation:pipeline:metric_commands:ranklemoment.png?600|}}{{:visual3d:documentation:pipeline:metric_commands:rankle_hsrms.png?600|}}
visual3d/documentation/pipeline/metric_commands/metric_root_mean_squared.1718801486.txt.gz · Last modified: 2024/06/19 12:51 by sgranger