sift:tutorials:perform_principal_component_analysis
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
sift:tutorials:perform_principal_component_analysis [2024/07/26 15:27] – sgranger | sift:tutorials:perform_principal_component_analysis [2024/11/28 19:15] (current) – [Perform Principal Component Analysis] wikisysop | ||
---|---|---|---|
Line 3: | Line 3: | ||
This tutorial will show you how to use Sift in order to perform [[Sift: | This tutorial will show you how to use Sift in order to perform [[Sift: | ||
- | For this tutorial, we will be comparing | + | For this tutorial, we will be comparing the knee flexion angles between participants with osteoarthritis and the normal control group. Our problem is to provide an explanation for differences in knee flexion angles between osteoarthritic walking versus normal walking. We can accomplish this by defining two groups that meet these signal definitions, |
+ | If you prefer, a video tutorial is available outlining the same process. It is available at this link: [[https:// | ||
==== Data ==== | ==== Data ==== | ||
Line 13: | Line 14: | ||
As with previous tutorials, we begin by loading the CMZ library and defining the queries relevant to our question. | As with previous tutorials, we begin by loading the CMZ library and defining the queries relevant to our question. | ||
- | 1. Click {{: | + | - Click {{: |
- | + | | |
- | 2. Click {{: | + | |
- | + | ||
- | 3. Click {{: | + | |
==== Define queries and calculate groups ==== | ==== Define queries and calculate groups ==== | ||
Line 23: | Line 22: | ||
For this tutorial we will manually create two groups based on tags, one for subjects with osteoarthritis and one for normal control subjects. We begin by defining a query for subjects with the OA tag (indicating osteoarthritis). | For this tutorial we will manually create two groups based on tags, one for subjects with osteoarthritis and one for normal control subjects. We begin by defining a query for subjects with the OA tag (indicating osteoarthritis). | ||
- | 1. Click on the {{: | + | - Click on the {{: |
- | + | | |
- | 2. {{: | + | |
- | + | | |
- | 3. {{: | + | |
- | + | | |
- | 3.1. **Signals**: | + | |
- | + | ||
- | 3.2. **Events**: There are no events in this data set, so this tab can be skipped. | + | |
- | + | ||
- | 3.3. **Refinements**: | + | |
- | + | ||
- | 3.4. Click **Save** | + | |
Next we will define a query for subjects with the NC tag (indicating Normal Control). In this case we can easily modify our previous query rather than starting from scratch. | Next we will define a query for subjects with the NC tag (indicating Normal Control). In this case we can easily modify our previous query rather than starting from scratch. | ||
- | 1. {{: | + | - {{: |
- | + | | |
- | 2. {{: | + | |
- | + | | |
- | 3. In the **Refinements** tab, change the selected tag from OA to NC. | + | |
- | + | ||
- | 4. Click **Save**. | + | |
You can verify here that the new NC group has the same signal and event selections as the OA group. Click **Calculate All Queries** and then close the Query Builder dialog. | You can verify here that the new NC group has the same signal and event selections as the OA group. Click **Calculate All Queries** and then close the Query Builder dialog. | ||
Line 53: | Line 43: | ||
There will now be two Groups in the [[Sift: | There will now be two Groups in the [[Sift: | ||
- | 1. Set the plot type to Signal-Time. | + | - Set the plot type to Signal-Time. |
- | + | | |
- | 2. Select all groups and all workspaces. | + | |
- | + | | |
- | 3. Check only the **Plot Workspace Mean** checkbox. | + | |
- | + | ||
- | 4. Click **Refresh Plot**. | + | |
The plot that is produced will not be very informative if the traces are not coloured by group, which is the comparison we are interested in. If this is the case, open the {{: | The plot that is produced will not be very informative if the traces are not coloured by group, which is the comparison we are interested in. If this is the case, open the {{: | ||
Line 73: | Line 60: | ||
==== Running Principal Component Analysis ==== | ==== Running Principal Component Analysis ==== | ||
- | 1. Ensure that all groups and workspaces are selected in the **Groups** and **Workspaces** lists. | + | - Ensure that all groups and workspaces are selected in the **Groups** and **Workspaces** lists. |
- | + | | |
- | 2. Select the {{: | + | |
- | + | | |
- | 3. Set the name for this PCA. | + | |
- | + | | |
- | 4. Set **Number PCs** to 4. | + | |
- | + | ||
- | 5. Ensure that **Use Workspace Mean** is checked. | + | |
- | + | ||
- | 6. Click **Run PCA**. | + | |
- | + | ||
- | 7. The results of these calculations will automatically populate the PCA graphs on the [[Sift: | + | |
Line 94: | Line 75: | ||
=== Variance Explained === | === Variance Explained === | ||
- | The Variance Explained window, which displays the variance explained by each principal component as well as the cumulative variance for each principal components. It is important to verify that the calculated principal components do explain a significant amount of the data set's variability. A good heuristic to use is that you want enough principal components to explain 95% of the data set's variety, otherwise there will be at least a moderate amount of variation that your analysis has not captured. In this example, our 4 principal components explain 96% of the data set's variability, | + | The Variance Explained window, which displays the variance explained by each principal component as well as the cumulative variance for each principal components. It is important to verify that the calculated principal components do explain a significant amount of the data set's variability. A good heuristic to use is that you want enough principal components to explain 95% of the data set's variety, otherwise there will be at least a moderate amount of variation that your analysis has not captured. In this example, our 4 principal components explain 96% of the data set's variability, |
{{: | {{: |
sift/tutorials/perform_principal_component_analysis.1722007620.txt.gz · Last modified: 2024/07/26 15:27 by sgranger