Noi/NOTES/2012-6-13
Jump to navigation
Jump to search
Regression analysis of UCLA SZ data (additional different age cutoff of grouping of data on LDA)[edit]
- Suggestions from lab meeting on 2012.05.16
- LDA: randomly choose samples for training and (have UCLA-SZ and UCSD-GA on training and testing data sets)
- LDA: Change age cutoff from 40 to different number (50, 60 or 70) and see how accurate the samples can be classified at different age cutoff.
- PCA: I also performed PCA and changed the color of each sample in scatter plot based on the age cutoff.
- Training and testing data set
- list 1-96 =>UCSD-SZ, 97-169 => UCSD-GA
- trainAge <- c(1:40, 91:132)
- testAge <- c(41:90, 133:169)
Regression analysis on age : LDA and PCA[edit]
Scripts: (Note: used the same template, but change color code based on age cutoff and labeling) LDA: lda_age-40_10FDR.txt PCA: plot_pca_age-40_10FDR.txt, plot_pca_age-40_label-age_10FDR.txt Color code: color.code_age_cutoff-40-70.txt PC scores (PC1-3) and labeling: Age-40_PCscores_Labeling.txt, Age-50_PCscores_Labeling.txt, Age-60_PCscores_Labeling.txt, Age-70_PCscores_Labeling.txt
Tables of raw data
Age cutoff 40 (10% FDR) | Predicted\Truth | Adult | Young adult | Correct | FALSE | Total |
Training | Adult | 54 | 2 | 77 | 5 | 82 |
Young adult | 3 | 23 | ||||
Testing | Adult | 59 | 1 | 85 | 2 | 87 |
Young adult | 1 | 26 | ||||
Cross validation | Adult | 112 | 3 | 161 | 8 | 169 |
Young adult | 5 | 49 |
Age cutoff 50 (10% FDR) | Predicted\Truth | Adult | Young adult | Correct | FALSE | Total |
Training | Adult | 51 | 4 | 76 | 6 | 82 |
Young adult | 2 | 25 | ||||
Testing | Adult | 58 | 0 | 85 | 2 | 87 |
Young adult | 2 | 27 | ||||
Cross validation | Adult | 110 | 4 | 162 | 7 | 169 |
Young adult | 3 | 52 |
Age cutoff 60 (10% FDR) | Predicted\Truth | Adult | Young adult | Correct | FALSE | Total |
Training | Adult | 32 | 7 | 72 | 10 | 82 |
Young adult | 3 | 40 | ||||
Testing | Adult | 40 | 13 | 71 | 16 | 87 |
Young adult | 3 | 31 | ||||
Cross validation | Adult | 72 | 22 | 141 | 28 | 169 |
Age cutoff 70 (10% FDR) | Predicted\Truth | Adult | Young adult | Correct | FALSE | Total |
Training | Adult | 14 | 4 | 70 | 12 | 82 |
Young adult | 8 | 56 | ||||
Testing | Adult | 16 | 8 | 68 | 19 | 87 |
Young adult | 11 | 52 | ||||
Cross validation | Adult | 30 | 12 | 138 | 31 | 169 |
Young adult | 19 | 108 |
Table of accuracy and misclassification rate
Age cutoff | Training (Accuracy of allocation) | Misclassicication rate | Testing (quality of model) | Misclassicication rate | Cross validation | Misclassicication rate |
40 | 77 of 82 | 6.10% | 85 of 87 | 2.30% | 161 of 169 | 4.73% |
50 | 76 of 82 | 7.32% | 85 of 87 | 2.30% | 162 of 169 | 4.14% |
60 | 72 of 82 | 12.20% | 71 of 87 | 18.39% | 141 of 169 | 16.57% |
70 | 70 of 82 | 14.63% | 68 of 87 | 21.84% | 138 of 169 | 18.34% |
PCA plots[edit]
Note: For the PCA plot labeled with age numbers. The number after dot(.) like 22.1 or 22.2 represent the duplication of sampleIDs with the same age.
Age cutoff: 40 File:UCLA-GA age-cutoff40 10FDR pcaplot1.png File:UCLA-GA age-cutoff40 10FDR pcaplot2.png Additional plots: UCLA-GA_age-cutoff40_10FDR_pca-label-age_plot1 UCLA-GA_age-cutoff40_10FDR_pca-label-age_plot2 UCLA-GA_age-cutoff40_10FDR_pcaplot1 UCLA-GA_age-cutoff40_10FDR_pcaplot2
Age cutoff: 50 File:UCLA-GA age-cutoff50 10FDR pcaplot1.png File:UCLA-GA age-cutoff50 10FDR pcaplot2.png Additional plots: UCLA-GA_age-cutoff50_10FDR_pca-label-age_plot1 UCLA-GA_age-cutoff50_10FDR_pca-label-age_plot2 UCLA-GA_age-cutoff50_10FDR_pcaplot1 UCLA-GA_age-cutoff50_10FDR_pcaplot2
Age cutoff: 60 File:UCLA-GA age-cutoff60 10FDR pcaplot1.png File:UCLA-GA age-cutoff60 10FDR pcaplot2.png Additional plots: UCLA-GA_age-cutoff60_10FDR_pca-label-age_plot1 UCLA-GA_age-cutoff60_10FDR_pca-label-age_plot2 UCLA-GA_age-cutoff60_10FDR_pcaplot1 UCLA-GA_age-cutoff60_10FDR_pcaplot2
Age cutoff: 70 File:UCLA-GA age-cutoff70 10FDR pcaplot1.png File:UCLA-GA age-cutoff70 10FDR pcaplot2.png Additional plots: UCLA-GA_age-cutoff70_10FDR_pca-label-age_plot1 UCLA-GA_age-cutoff70_10FDR_pca-label-age_plot2 UCLA-GA_age-cutoff70_10FDR_pcaplot1 UCLA-GA_age-cutoff70_10FDR_pcaplot2
The distribution and fraction of UCLA-SZ and UCSD-GA' AGE A<-read.table("UCLA-SZ_UCSD-GA.age.txt", sep=",") age<-as.numeric(A) length(age) ageFact<-factor(age) levels(ageFact) summary(ageFact) summary(ageFact) Age 19 21 22 23 24 25 26 27 28 29 30 31 32 33 35 36 37 39 40 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 number 1 3 3 4 4 2 3 6 5 2 4 3 2 1 4 2 1 1 1 2 2 2 3 4 3 6 3 4 5 2 3 1 4 3 2 4 5 2 2 4 Age 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 number 2 5 2 3 3 1 2 3 2 3 5 7 5 2 3 1 2
Summary