weights.joinet.html 8.21 KB
Newer Older
 Armin Rauschenberger committed Mar 15, 2019 1 2   Armin Rauschenberger committed Jul 31, 2019 3   Armin Rauschenberger committed Mar 15, 2019 4 5 6 7 8   Armin Rauschenberger committed Jul 31, 2019 9 Extract Weights — weights.joinet • joinet  Armin Rauschenberger committed Mar 15, 2019 10 11   Armin Rauschenberger committed Jul 31, 2019 12   Armin Rauschenberger committed Mar 15, 2019 13   Armin Rauschenberger committed Jul 31, 2019 14   Armin Rauschenberger committed Mar 15, 2019 15   Armin Rauschenberger committed Jul 31, 2019 16   Armin Rauschenberger committed Mar 15, 2019 17 18   Armin Rauschenberger committed Jul 31, 2019 19   Armin Rauschenberger committed Mar 15, 2019 20 21   Armin Rauschenberger committed Jul 31, 2019 22   Armin Rauschenberger committed Mar 15, 2019 23 24 25 26 27 28 29 30 31 32   Armin Rauschenberger committed Jul 31, 2019 33   Armin Rauschenberger committed Mar 15, 2019 34   Armin Rauschenberger committed Jun 07, 2019 35 36   Armin Rauschenberger committed Mar 15, 2019 37 38 39 40 41   Armin Rauschenberger committed Jul 31, 2019 42 43   Armin Rauschenberger committed Mar 15, 2019 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 
 Armin Rauschenberger committed Jun 07, 2019 119 120 

Extracts coefficients from the meta learner, i.e. the weights for the base learners.

 Armin Rauschenberger committed Mar 15, 2019 121 122 123 
 Armin Rauschenberger committed Jul 31, 2019 124 
# S3 method for joinet 
Armin Rauschenberger committed Jul 31, 2019  125                                                                                                               weights(object, ...)
 Armin Rauschenberger committed Mar 15, 2019 126 127 128 129 130 

Arguments

object

joinet object

...

further arguments (not applicable)

 Armin Rauschenberger committed Jun 07, 2019 131   Armin Rauschenberger committed Jul 31, 2019 132   Armin Rauschenberger committed Mar 15, 2019 133 134 135 136 137 138 139   Armin Rauschenberger committed Aug 02, 2019 140 141 142 143 144 145 146 147 148 

Value

This function returns a matrix with $$1+q$$ rows and $$q$$ columns. The first row contains the intercepts, and the other rows contain the slopes, which are the effects of the outcomes in the row on the outcomes in the column.

 Armin Rauschenberger committed Mar 15, 2019 149 150 

Examples

 Armin Rauschenberger committed Aug 07, 2019 151 
n <- 50; p <- 100; q <- 3  Armin Rauschenberger committed Jul 31, 2019 152 X <- matrix(rnorm(n*p),nrow=n,ncol=p)  Armin Rauschenberger committed Aug 06, 2019 153 154 155 156 157 158 159 Y <- replicate(n=q,expr=rnorm(n=n,mean=rowSums(X[,1:5]))) object <- joinet(Y=Y,X=X) weights(object)
#> y1 y2 y3 #> (Intercept) 0.4123532 0.2048455 0.3295532 #> V1 0.3347547 0.7144811 0.4977934 #> V2 0.4795655 0.1919470 0.3724097 #> V3 0.6110722 0.4751144 0.4351376
 Armin Rauschenberger committed Mar 15, 2019 160 161 162 163 164 165