我看起来像这样,从CSV导入。 前10列是一个变量,列11-20是另一个变量。 我想将X转换为layer_conv_1d所需的格式,但我似乎无法弄明白。据我所知,我的输入形状为input_shape = c(10,2)
head(X)
V1 V2 V3 V4 V5 V6 V7 V8 V9 V10
119584 -0.00376 -0.37296 -0.37115 -0.23247 -0.27340 -0.23744 -0.13158 -0.15616 -0.30983 -0.16377
119585 -0.04429 -0.12537 -0.29646 -0.33452 -0.22150 -0.23713 -0.23534 -0.14301 -0.20708 -0.27785
119586 0.35284 0.18692 0.19451 -0.07150 -0.13848 -0.05159 -0.10095 -0.11955 -0.05895 -0.05839
119587 0.41299 0.54358 0.51501 0.34005 0.12726 0.03750 0.10031 0.03710 -0.01083 0.08740
119588 0.04931 0.31275 0.58071 0.36755 0.30218 0.11168 0.05365 0.10055 0.01358 0.00443
119589 0.00732 -0.01598 0.32237 0.40372 0.31837 0.24941 0.11900 0.03795 0.06665 0.01789
V11 V12 V13 V14 V15 V16 V17 V18 V19 V20
119584 -0.10191 0.24528 0.22535 0.10682 0.14382 0.10150 0.02138 -0.03733 -0.07256 -0.04263
119585 -0.06495 -0.05586 0.12504 0.15400 0.04311 0.13571 0.07491 0.01583 -0.02098 -0.03453
119586 -0.09273 -0.01665 -0.12912 0.01514 0.04226 -0.01941 0.05849 0.01480 -0.01159 -0.03419
119587 0.07566 0.16196 0.18275 0.06934 -0.02789 -0.01875 -0.11493 -0.00169 -0.00321 -0.03522
119588 -0.09223 0.12027 0.18351 0.24200 0.13347 0.05639 -0.03912 -0.10456 -0.01922 -0.03450
119589 -0.29684 -0.27518 -0.03169 0.07350 0.13735 0.05659 -0.03650 -0.09719 -0.11509 -0.04352