[R] Linear Discriminant Analysis in R
cobbler_squad
la.foma at gmail.com
Sun May 30 07:00:34 CEST 2010
Hi Janis,
As you have suggested below is the output for the following:
test.vowel <- vowel_features[,1:10]
test.mask <- mask_features[,1:10]
dput(test.vowel)
dput(test.mask)
--- NOTE: outputs are limited
>>test_vowel ---- first 12 columns are all zero (total of 26 columns)
V1 V2 V3 V4 V5 V6 V7 V8 V9 V10
1 0 0 0 0 0 0 0 0 0 0
2 0 0 0 0 0 0 0 0 0 0
3 0 0 0 0 0 0 0 0 0 0
4 0 0 0 0 0 0 0 0 0 0
5 0 0 0 0 0 0 0 0 0 0
6 0 0 0 0 0 0 0 0 0 0
7 0 0 0 0 0 0 0 0 0 0
8 0 0 0 0 0 0 0 0 0 0
9 0 0 0 0 0 0 0 0 0 0
10 0 0 0 0 0 0 0 0 0 0
>>test_mask (sample output for first 6 columns and 5 rows)
V1 V2 V3 V4
V5 V6
1 0.034495155 0.990218632 0.601464511 0.014837676 0.058299799 0.818202398
2 0.683688879 0.541566798 0.898061753 0.008456439 0.800863858 0.381366477
3 0.464978895 0.844494807 0.281241401 0.290183593 0.552412608 0.158107894
4 0.200058599 0.270115497 0.179173377 0.341301213 0.672338934 0.322934948
5 0.595020534 0.633111358 0.861024861 0.811241462 0.326562913 0.363330793
>>dput(test.vowel)
structure(list(V1 = c(0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L,
0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L,
0L, 0L, 0L, 0L), V2 = c(0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L,
0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L,
0L, 0L, 0L, 0L), V3 = c(0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L,
0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L,
0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L,
0L, 0L, 0L, 0L), V4 = c(0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L,
0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L,
0L, 0L, 0L, 0L), V5 = c(0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L,
0L, 0L, 0L, 0L), V6 = c(0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L,
0L, 0L, 0L, 0L), V7 = c(0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L,
0L, 0L, 0L, 0L), V8 = c(0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L,
0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L,
0L, 0L, 0L, 0L), V9 = c(0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L,
0L, 0L, 0L, 0L), V10 = c(0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L,
0L, 0L, 0L, 0L, 0L)), .Names = c("V1", "V2", "V3", "V4", "V5",
"V6", "V7", "V8", "V9", "V10"), class = "data.frame", row.names = c(NA,
-254L))
>>dput(test.mask)
structure(list(V1 = c(0.034495155, 0.683688879, 0.464978895,
0.877838275, 0.943014871, 0.163438168), V2 = c(0.990218632, 0.541566798,
0.025567579, 0.159811845, 0.13874224, 0.752357297, 0.669662897,
0.854803677, 0.28129096, 0.858919573, 0.98992922, 0.980733255,
0.452405459, 0.376828532, 0.901208552), V3 = c(0.601464511, 0.898061753,
0.38395498, 0.923324665, 0.529832526, 0.182135661), V4 = c(0.014837676,
0.166132726, 0.893089168, 0.45962114, 0.018438501, 0.667720635
), V5 = c(0.058299799, 0.800863858, 0.552412608, 0.672338934,
0.185407787, 0.691367432), V6 = c(0.818202398, 0.381366477, 0.158107894,
0.322934948, 0.363330793, 0.161321704, 0.052999774, 0.513440813,
0.402895033, 0.201576687, 0.076826481), V7 = c(0.642136394, 0.099776129,
0.148801865, 0.603051825, 0.440594157, 0.215038249, 0.531623479,
0.534920743, 0.45784502, 0.080887221), V8 = c(0.016004048, 0.519115043,
0.149317949, 0.088362708, 0.705002368, 0.185590863, 0.434963787,
0.847410734, 0.78777694, 0.443995646, 0.53903599), V9 = c(0.400620271,
0.918472003, 0.446820588, 0.310981412, 0.734013866, 0.172112916
), V10 = c(0.532136091, 0.350028839, 0.40424688, 0.607395545,
0.392450857, 0.306530929, 0.756277707, 0.63606622, 0.718866192,
0.258778101)), .Names = c("V1", "V2", "V3", "V4", "V5", "V6",
"V7", "V8", "V9", "V10"), class = "data.frame", row.names = c(NA,
-671L))
Thank you once more for your help. I really can not say it enough.
ps. original files i work with are attached.
Cobbler.
http://r.789695.n4.nabble.com/file/n2236083/3dMaskDump.txt 3dMaskDump.txt
http://r.789695.n4.nabble.com/file/n2236083/vowel_features.txt
vowel_features.txt
--
View this message in context: http://r.789695.n4.nabble.com/Linear-Discriminant-Analysis-in-R-tp2231922p2236083.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list