sift:tutorials:outlier_detection_with_pca
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
sift:tutorials:outlier_detection_with_pca [2024/08/28 17:25] – [Mahalanobis Distance Test] wikisysop | sift:tutorials:outlier_detection_with_pca [2024/08/28 17:54] (current) – [Mahalanobis Distance and SPE Tests] wikisysop | ||
---|---|---|---|
Line 79: | Line 79: | ||
{{: | {{: | ||
- | We can clearly see an issue with using Euclidean Distance: while the dimensions do not covary (as PCA creates an independent basis), the PC1 clearly has a larger variance that should be accounted for. We are interested in automatically and algorithmic-ally removing the outliers that don't follow our general observations, | + | We can clearly see an issue with using Euclidean Distance: while the dimensions do not covary (as PCA creates an independent basis), the PC1 clearly has a larger variance that should be accounted for. We are interested in automatically and algorithmic-ally removing the outliers that don't follow our general observations, |
- | A pop-up window will appear, allowing you to customize some features | + | A pop-up window will appear, allowing you to customize some features |
{{: | {{: | ||
Line 89: | Line 89: | ||
We choose to use 2 PCs, as the workspace scores are presented in 2 dimensions. | We choose to use 2 PCs, as the workspace scores are presented in 2 dimensions. | ||
- | The Outlier alpha value is a tuneable parameter within the Mahalanobis Distance Calculation, | + | The Outlier alpha value is a tuneable parameter within the Mahalanobis Distance Calculation, |
Upon running the Mahalanobis Distance Test, you should see the following datapoints highlighted (note that we rescaled the PC1 axis to have equivalent spacing to the PC2 axis): | Upon running the Mahalanobis Distance Test, you should see the following datapoints highlighted (note that we rescaled the PC1 axis to have equivalent spacing to the PC2 axis): | ||
Line 97: | Line 97: | ||
We can immediately see that there are outliers whose (rough) Euclidean distance is much smaller than some of the inliers (ex: points near the PC1 axis at roughly +/-500 in the PC2 axis are closer than those along the PC2 axis at roughly +/-1000 in the PC1 axis). Using a normal distance measure would identify these differently, | We can immediately see that there are outliers whose (rough) Euclidean distance is much smaller than some of the inliers (ex: points near the PC1 axis at roughly +/-500 in the PC2 axis are closer than those along the PC2 axis at roughly +/-1000 in the PC1 axis). Using a normal distance measure would identify these differently, | ||
+ | Upon running the SPE Test, you should see the following datapoints highlighted: | ||
+ | {{: | ||
+ | We notice that the outliers are seemingly random, some far away from the origin, while others are well within the 2D cluster. This is because SPE measures the reconstruction error! And not error within the lower dimensional representation. We can clearly see this through the PC Reconstruction page, if we plot one of the identified outliers (Sub04:: | ||
+ | |||
+ | {{: | ||
+ | |||
+ | We can see there are some very clear errors in comparison to the ground truth! If you plot an inlier, you would see significantly less errors in this projection. |
sift/tutorials/outlier_detection_with_pca.1724865930.txt.gz · Last modified: 2024/08/28 17:25 by wikisysop