Documentation Site Map Main Page Reference List Motion Capture Visual3D Overview Visual3D Installation License Activation Getting Started Visual3D Documentation Overview Pipeline Commands Reference Expressions Overview CalTester Mode Overview List of Tutorials Visual3D Examples Overview Troubleshooting Sift Sift Overview Installation Getting Started Sift Documentation Overview Knowledge Discovery for Biomechanical Data Tutorial Overview Troubleshooting Inspect3D Inspect3D Overview Inspect3D Installation Overview Inspect3D Getting Started Overview Inspect3D Documentation Overview Knowledge Discovery in Inspect3D Inspect3D Tutorials Overview Troubleshooting DSX Suite DSX Overview DSX Definitions DSX Suite Installation DSX Tutorials DSX Release Notes xManager Overview PlanDSX Overview Surface3D Overview Orient3D Overview CalibrateDSX Overview Locate3D Overview X4D Overview
This is an old revision of the document!
k-means clustering]] page. this tutorial will showcase how to interpret the results of clustering between a normal group and an osteoarthritis group. ===== overview of tutorial ===== this tutorial works off the [[inspect3d:tutorials:perform_principal_component_analysis|principal component analysis tutorial]], and assumes a good understanding of using pca in inspect3d. this tutorial uses overground walking data from roughly 100 subjects divided into two conditions, normal control and osteoarthritis (moderate to severe). this data set is included in the demo folder of your inspect3d installation (e.g., c:\program files\c-motion\inspect3d\demo). this is the same data as the pca tutorial. ===== running a k-means test ===== it is assumed the groups are loaded, and a pca has been completed. means_tab.png 1. open the i3d_pcaoptions2.png **pca options** dropdown menu on the [[inspect3d:documentation:dialogs:toolbar|toolbar]]. 2. click i3d_runpca.png **run qa using pca**. 3. a new dialog will display with option of a t-squared and q-test, custom routine, local outlier factor and k-means. select the k-means tab. 4. change the number of clusters to the correct number for your analysis. this can be an iterative approach, by conducting the k-means analysis multiple times until you are happy with the output. for this example we are going to stick to 2. 5. change the maximum iterations to the number of times you want k-means to iterate. more iterations will give you higher accuracy but at a computational cost. this example will leave it at 5. 6. change the number of pcs to the number of principal components that represent the workspace. this will be kept at four. 7. select use workspace mean. 8. select run k-means. 9. close the i3d_runpca.png **run qa using pca** dialog. 10. got to the i3dshowoptions.png **show options** dialog and change plot style to cluster. the colors of the clusters are automatically set to the color palette. this can be changed by going to the colour palette tab. 11. close the i3dshowoptions.png **show options** dialog, and select the workspace scores in the pca results. you should see the clusters of data points. cluster.png ===== interpreting k-means results ===== the results of the k-means clustering can be seen in the workspace scores tab. the queried data should also be updated to reflect the correct clustering. **note:** results may vary if different parameters were chosen. meansresults1.png looking at the workspace tab we can select different points and the group and file will be displayed. this allows us to view which data points in a cluster belong to what group. we can clearly see the data points split into to clusters, light blue and dark blue, with somewhat of a separation. light blue tends to be in the top right corner and dark blue tends to be in the bottom left. meansresults3.png a k-means test finds the similarity between data points and groups them together into clusters. if you had two groups that were vastly different, the clusters would not have mixed groups. if the data points between groups have similarities the clusters may have data points from different groups. if we look at the results from this k-means we can see that the clusters are not a perfect representation of each group, signifying that there is some overlap and similarities between groups. the graph on the left shows the groups split up with the osteoarthritis group in purple and the normal group in blue. the graph on the right shows the two clusters. if we look at the light blue cluster it seems to be mainly the osteoarthritis group, and if we look at the dark blue cluster it seems to be mainly the normal group. the points circled in red show some osteoarthritis datapoints in the second cluster, again indicating some overlap. meansresults2.png }}}}}}}}}}}}}}}}}}