File: matlab.example.txt

package info (click to toggle)
r-cran-pcapp 2.0-5-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 800 kB
  • sloc: cpp: 5,997; ansic: 917; sh: 13; makefile: 2
file content (109 lines) | stat: -rw-r--r-- 2,091 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
>> rand('seed', 0) ;
>> X = rand (100, 5) ;
>> mHC = l1median_HoCr (X)

mHC =

    0.5261    0.5123    0.5171    0.4963    0.4635

>> mVZ = l1median_VaZh (X)

mVZ =

    0.5261    0.5123    0.5171    0.4963    0.4635

>> pc = PCAgrid (X)

pc = 

        sdev: [0.4251 0.3939]
    loadings: [5x2 double]
           k: 2
         obj: [0.1807 0.1552]
       n_obs: 100
       scale: [1 1 1 1 1]
      center: [0.5261 0.5123 0.5171 0.4963 0.4635]
    pc_order: [1 2]
      scores: [100x2 double]

>> sp = PCAproj (X, 2)

sp = 

    loadings: [5x2 double]
        sdev: [0.4027 0.3835]
      center: [0.5261 0.5123 0.5171 0.4963 0.4635]
       scale: [1 1 1 1 1]
       n_obs: 100
>> rand('seed', 0) ;
>> X = rand (100, 5) ;
>> mHC = l1median_HoCr (X)

mHC =

    0.5261    0.5123    0.5171    0.4963    0.4635

>> mVZ = l1median_VaZh (X)

mVZ =

    0.5261    0.5123    0.5171    0.4963    0.4635

>> pc = PCAgrid (X)

pc = 

        sdev: [0.4251 0.3939]
    loadings: [5x2 double]
           k: 2
         obj: [0.1807 0.1552]
       n_obs: 100
       scale: [1 1 1 1 1]
      center: [0.5261 0.5123 0.5171 0.4963 0.4635]
    pc_order: [1 2]
      scores: [100x2 double]

>> sp = PCAproj (X, 2)

sp = 

    loadings: [5x2 double]
        sdev: [0.4027 0.3835]
      center: [0.5261 0.5123 0.5171 0.4963 0.4635]
       scale: [1 1 1 1 1]
       n_obs: 100
      scores: [100x2 double]

>> sp = PCAproj (X, 5, 'mad', 'lincomb')

sp = 

    loadings: [5x5 double]
        sdev: [2.0793 0.4027 0.3835 0.3474 0.3110]
      center: [0.5261 0.5123 0.5171 0.4963 0.4635]
       scale: [1 1 1 1 1]
       n_obs: 100
      scores: [100x5 double]

>> sc = qn (X)

sc =

    0.2958     scores: [100x2 double]

>> sp = PCAproj (X, 5, 'mad', 'lincomb')

sp = 

    loadings: [5x5 double]
        sdev: [2.0793 0.4027 0.3835 0.3474 0.3110]
      center: [0.5261 0.5123 0.5171 0.4963 0.4635]
       scale: [1 1 1 1 1]
       n_obs: 100
      scores: [100x5 double]

>> sc = qn (X)

sc =

    0.2958