@@ -48,38 +48,40 @@ set.seed(123)
4848## ncores : parallel paramaters for large datasets
4949cv <- o2cv(X,Y,1:5,1:3,1:3,group=group,nr_folds = 10)
5050#####################################
51- # The best paramaters are nc = 5 , nx = 3 , ny = 3
51+ # The best paramaters are nc = 5 , nx = 2 , ny = 3
5252#####################################
53- # The Qxy is 0.08222935 and the RMSE is: 2.030108
53+ # The Qxy is 0.082 and the RMSE is: 2.030108
5454#####################################
5555```
5656
57- Then we can do the O2PLS analysis with nc = 5, nx = 3 , ny =3. You can also select the best paramaters by looking at the cross validation results.
57+ Then we can do the O2PLS analysis with nc = 5, nx = 2 , ny =3. You can also select the best paramaters by looking at the cross validation results.
5858``` {r}
59- fit <- o2pls(X,Y,5,3 ,3)
59+ fit <- o2pls(X,Y,5,2 ,3)
6060summary(fit)
6161######### Summary of the O2PLS results #########
62- ### Call o2pls(X, Y, nc= 5 , nx= 3 , ny= 3 ) ###
62+ ### Call o2pls(X, Y, nc= 5 , nx= 2 , ny= 3 ) ###
6363### Total variation
6464### X: 4900 ; Y: 4900 ###
65- ### Total modeled variation ### X: 0.286 ; Y: 0.304 ###
65+ ### Total modeled variation ### X: 0.265 ; Y: 0.306 ###
6666### Joint, Orthogonal, Noise (proportions) ###
67- # X Y
68- # Joint 0.176 0.192
69- # Orthogonal 0.110 0.112
70- # Noise 0.714 0.696
71- ### Variation in X joint part predicted by Y Joint part: 0.906
72- ### Variation in Y joint part predicted by X Joint part: 0.908
67+ X Y
68+ Joint 0.191 0.197
69+ Orthogonal 0.074 0.109
70+ Noise 0.735 0.694
71+ ### Variation in X joint part predicted by Y Joint part: 0.924
72+ ### Variation in Y joint part predicted by X Joint part: 0.926
7373### Variation in each Latent Variable (LV) in Joint part:
74- # LV1 LV2 LV3 LV4 LV5
75- #X 181.764 179.595 191.210 152.174 157.819
76- #Y 229.308 204.829 175.926 173.382 155.934
74+ LV1 LV2 LV3 LV4 LV5
75+ X 0.040 0.039 0.041 0.037 0.035
76+ Y 0.049 0.045 0.035 0.037 0.032
7777### Variation in each Latent Variable (LV) in X Orthogonal part:
78- # LV1 LV2 LV3
79- #X 227.856 166.718 143.602
78+ LV1 LV2
79+ X 0.04 0.034
8080### Variation in each Latent Variable (LV) in Y Orthogonal part:
81- # LV1 LV2 LV3
82- #Y 225.833 166.231 157.976
81+ LV1 LV2 LV3
82+ Y 0.045 0.034 0.03
83+
84+ ############################################
8385
8486```
8587
0 commit comments