Score impact of each sample on sparse leading eigen-value. Compute correlation using all samples (i.e. C), then compute correlation omitting sample i (i.e. Ci). The score the sample i is based on sparse leading eigen-value of the diffrence between C and Ci.
Usage
sle.score(
Y,
method = c("pearson", "kendall", "spearman"),
rho = 0.05,
sumabs = 1
)
Arguments
- Y
data matrix with samples on rows and variables on columns
- method
specify which correlation method: "pearson", "kendall" or "spearman"
- rho
a positive constant such that cor(Y) + diag(rep(rho,p)) is positive definite.
- sumabs
regularization paramter. Value of 1 gives no regularization, sumabs*sqrt(p) is the upperbound of the L_1 norm of v,controling the sparsity of solution. Must be between 1/sqrt(p) and 1.
Examples
# load iris data
data(iris)
# Evalaute score on each sample
sle.score( iris[,1:4] )
#> 1 2 3 4 5 6
#> 0.0100508501 0.0063532005 0.0040422346 0.0035951853 0.0132116072 0.0125309552
#> 7 8 9 10 11 12
#> 0.0100934398 0.0082490593 0.0114693323 0.0032052360 0.0122602163 0.0093574036
#> 13 14 15 16 17 18
#> 0.0070555663 0.0088254694 0.0184610609 0.0146444218 0.0144360540 0.0097520909
#> 19 20 21 22 23 24
#> 0.0118698471 0.0155046106 0.0061783969 0.0131563750 0.0169579645 0.0047634522
#> 25 26 27 28 29 30
#> 0.0090398155 0.0056904038 0.0077634331 0.0092150805 0.0069066487 0.0039830882
#> 31 32 33 34 35 36
#> 0.0031741402 0.0058447528 0.0203620157 0.0184108094 0.0030292459 0.0028027419
#> 37 38 39 40 41 42
#> 0.0089979730 0.0144614375 0.0076171795 0.0075813407 0.0105486832 0.0391144133
#> 43 44 45 46 47 48
#> 0.0043555698 0.0090955256 0.0139203037 0.0062276312 0.0159334491 0.0042216347
#> 49 50 51 52 53 54
#> 0.0124391046 0.0056051298 0.0062012259 0.0025538913 0.0027379404 0.0077974686
#> 55 56 57 58 59 60
#> 0.0031339724 0.0019131283 0.0048033019 0.0168761145 0.0026469713 0.0063139558
#> 61 62 63 64 65 66
#> 0.0270335216 0.0003607039 0.0095555803 0.0010817355 0.0011013864 0.0022526040
#> 67 68 69 70 71 72
#> 0.0022366774 0.0025516518 0.0041880468 0.0050152029 0.0037346124 0.0010691602
#> 73 74 75 76 77 78
#> 0.0050958706 0.0020457400 0.0017485637 0.0012400943 0.0048936187 0.0007369925
#> 79 80 81 82 83 84
#> 0.0009470987 0.0045808930 0.0076575464 0.0086515896 0.0011598561 0.0033769991
#> 85 86 87 88 89 90
#> 0.0040138952 0.0053708319 0.0017749569 0.0058275110 0.0010149180 0.0051076748
#> 91 92 93 94 95 96
#> 0.0044393934 0.0003113556 0.0017605131 0.0181676043 0.0023235321 0.0006398017
#> 97 98 99 100 101 102
#> 0.0009850551 0.0010481157 0.0118987312 0.0010920772 0.0139253836 0.0055572820
#> 103 104 105 106 107 108
#> 0.0026698326 0.0018311742 0.0016102118 0.0034648797 0.0183216541 0.0038243309
#> 109 110 111 112 113 114
#> 0.0112190900 0.0320116383 0.0054984010 0.0057990997 0.0022704649 0.0092346175
#> 115 116 117 118 119 120
#> 0.0089619798 0.0073418013 0.0012511391 0.0473107730 0.0183510194 0.0034704520
#> 121 122 123 124 125 126
#> 0.0093238498 0.0071416694 0.0081656016 0.0046067168 0.0110746046 0.0081178997
#> 127 128 129 130 131 132
#> 0.0028699817 0.0005083525 0.0043144966 0.0031497198 0.0071068499 0.0458246032
#> 133 134 135 136 137 138
#> 0.0042239870 0.0028311575 0.0055666365 0.0029206057 0.0157660466 0.0027558203
#> 139 140 141 142 143 144
#> 0.0009196381 0.0044974112 0.0052033499 0.0049786976 0.0055572820 0.0094222000
#> 145 146 147 148 149 150
#> 0.0132687311 0.0026642950 0.0071995856 0.0013516828 0.0141944453 0.0020270562