Vanilla RNN genomic predictor (BPTT, base R)
Usage
morie_rnn_genomic(
x,
y,
markers,
hidden = 8,
n_epochs = 150,
lr = 0.01,
l2 = 0.001,
seed = 0,
deterministic_seed = NULL
)Arguments
- x
Optional fixed-effect design.
- y
Numeric response.
- markers
(n x L) marker sequence.
Hyperparameters.
- deterministic_seed
Optional integer; if supplied, RNG state is derived via
morie_det_rng()keyed on ("rnnge", deterministic_seed) so Py<->R streams agree on the canonical fixture. WhenNULL(default) behaviour is unchanged.
Examples
morie_rnn_genomic(x = rnorm(50), y = rnorm(50), markers = matrix(sample(0:2, 200, TRUE), 50, 4))
#> $estimate
#> [1] 0.01088461
#>
#> $y_hat
#> [1] -0.272221714 -0.089536995 0.200724149 0.365164478 0.023546413
#> [6] -0.379995257 0.045253209 0.045253209 0.020512495 0.341779434
#> [11] 0.121298928 -0.149066549 0.211876214 -0.149066549 0.289967328
#> [16] 0.014995250 0.415699163 0.176572991 0.023546413 0.181589977
#> [21] 0.365164478 -0.521710587 0.014995250 -0.216997820 -0.283533060
#> [26] 0.023546413 -0.521710587 -0.087639344 0.058751386 -0.193263244
#> [31] 0.103862652 -0.657204131 0.023546413 -0.142181713 0.079001545
#> [36] 0.300209503 0.045253209 0.359255732 0.300209503 -0.087639344
#> [41] 0.679656897 -0.002258279 0.244335178 0.002194288 -0.379995257
#> [46] -0.149066549 0.200724149 -0.403120774 0.182622490 -0.230670370
#>
#> $W_h
#> [,1] [,2] [,3] [,4] [,5] [,6]
#> [1,] -0.06190036 0.2905685 0.60345433 0.16545394 -0.39618955 0.61711322
#> [2,] 0.51620787 -0.4356452 0.56393228 -0.06821099 0.24057080 -0.11695676
#> [3,] -0.28133356 -0.3520482 -0.11569580 0.14935745 0.01423391 -0.59010756
#> [4,] -0.17362669 0.5223816 -0.79765764 -0.15858495 -0.58014218 0.05705632
#> [5,] -0.31742570 -0.3479901 0.87262935 -0.46253807 -0.02888429 0.09516989
#> [6,] -0.05057127 0.1378439 0.23048695 0.35511159 -0.21726332 -0.35525037
#> [7,] 0.13358339 -0.1416150 0.19963766 0.51844999 -0.07232583 -1.03752107
#> [8,] -0.25017347 0.1550113 -0.01184932 -0.09797240 -0.44196562 -0.21040134
#> [,7] [,8]
#> [1,] 0.19308555 0.36143354
#> [2,] -0.02576649 0.07264836
#> [3,] -0.03456865 -0.29988241
#> [4,] 0.17850696 0.40079124
#> [5,] -0.40212285 -0.68918901
#> [6,] 0.39947509 -0.18507000
#> [7,] -0.01743657 -0.10138811
#> [8,] 0.26693305 -0.04480934
#>
#> $W_x
#> [1] 1.085845032 0.202928392 0.473467986 -0.002639729 -0.180382443
#> [6] 0.761418937 1.211420974 -2.332583575
#>
#> $b_h
#> [1] -0.021421952 -0.002730018 -0.002505524 -0.005946881 0.007268884
#> [6] -0.004082517 0.016253728 0.001638599
#>
#> $w_o
#> [1] 0.21555237 0.12052571 -0.10521603 0.26038501 -0.17983413 -0.05961786
#> [7] 0.34744047 0.48756532
#>
#> $b_o
#> [1] 0.05985808
#>
#> $loss_curve
#> [1] 0.8792975 0.8768259 0.8744379 0.8721303 0.8699003 0.8677447 0.8656611
#> [8] 0.8636465 0.8616985 0.8598146 0.8579925 0.8562297 0.8545242 0.8528738
#> [15] 0.8512763 0.8497300 0.8482328 0.8467830 0.8453788 0.8440185 0.8427004
#> [22] 0.8414231 0.8401850 0.8389846 0.8378206 0.8366917 0.8355964 0.8345336
#> [29] 0.8335022 0.8325009 0.8315286 0.8305843 0.8296670 0.8287756 0.8279093
#> [36] 0.8270670 0.8262481 0.8254515 0.8246765 0.8239223 0.8231882 0.8224734
#> [43] 0.8217772 0.8210990 0.8204382 0.8197941 0.8191661 0.8185536 0.8179562
#> [50] 0.8173732 0.8168042 0.8162487 0.8157062 0.8151763 0.8146585 0.8141523
#> [57] 0.8136575 0.8131736 0.8127002 0.8122371 0.8117837 0.8113399 0.8109052
#> [64] 0.8104794 0.8100622 0.8096533 0.8092525 0.8088593 0.8084737 0.8080954
#> [71] 0.8077240 0.8073595 0.8070016 0.8066500 0.8063046 0.8059651 0.8056315
#> [78] 0.8053034 0.8049808 0.8046635 0.8043512 0.8040439 0.8037414 0.8034436
#> [85] 0.8031502 0.8028613 0.8025765 0.8022960 0.8020194 0.8017467 0.8014778
#> [92] 0.8012125 0.8009508 0.8006926 0.8004378 0.8001862 0.7999378 0.7996925
#> [99] 0.7994502 0.7992108 0.7989743 0.7987406 0.7985096 0.7982812 0.7980554
#> [106] 0.7978320 0.7976111 0.7973926 0.7971764 0.7969625 0.7967507 0.7965411
#> [113] 0.7963336 0.7961282 0.7959247 0.7957232 0.7955236 0.7953259 0.7951299
#> [120] 0.7949358 0.7947434 0.7945526 0.7943636 0.7941761 0.7939902 0.7938059
#> [127] 0.7936231 0.7934418 0.7932620 0.7930836 0.7929065 0.7927309 0.7925565
#> [134] 0.7923835 0.7922118 0.7920413 0.7918721 0.7917040 0.7915372 0.7913715
#> [141] 0.7912070 0.7910436 0.7908812 0.7907200 0.7905598 0.7904007 0.7902426
#> [148] 0.7900855 0.7899293 0.7897742
#>
#> $se
#> [1] 0.8886056
#>
#> $n
#> [1] 50
#>
#> $method
#> [1] "Vanilla RNN BPTT (base R)"
#>