
Create Logistic Features
create_logist_features.RdThis function takes a matrix or dataframe of features, removes columns that are entirely NA, and then applies three logistic transformations to each column. Each transformed set of features is appended with suffixes "_early", "_linear", or "_late" to differentiate between them. The resulting matrix combines all transformed features.
Value
A matrix containing the transformed features with columns named according to the transformation applied (i.e., "_early", "_linear", or "_late").
See also
logist for the logistic transformation function.
Examples
sample_features <- matrix(rnorm(100), ncol = 5)
create_logist_features(sample_features)
#> V1_high-energy V1_higher-energy V1_low-energy V1_sigmoid V2_high-energy
#> [1,] 0.015194518 0.000117204021 0.063742721 0.0086228195 0.016027914
#> [2,] 0.003976017 0.000007935848 -0.543645366 0.0005885478 0.006994522
#> [3,] 0.013348714 0.000090291318 -0.001392821 0.0066559143 0.019299783
#> [4,] 0.018220130 0.000169038405 0.154149501 0.0123893993 0.034055131
#> [5,] 0.023646487 0.000286267360 0.279466150 0.0208039625 0.012753208
#> [6,] 0.005404801 0.000014685091 -0.426372203 0.0010885521 0.008404503
#> [7,] 0.011837865 0.000070901883 -0.061752650 0.0052340335 0.013280079
#> [8,] 0.011856270 0.000071123839 -0.060974168 0.0052503330 0.008873430
#> [9,] 0.011631501 0.000068437305 -0.070558917 0.0050530095 0.006306271
#> [10,] 0.010165069 0.000052192158 -0.137547431 0.0038581596 0.021282514
#> [11,] 0.018287317 0.000170298815 0.155962176 0.0124806338 0.014611577
#> [12,] 0.037139117 0.000715745529 0.474805392 0.0504514533 0.015107072
#> [13,] 0.005944291 0.000017772627 -0.386558308 0.0013171205 0.029892801
#> [14,] 0.017260972 0.000151564140 0.127410507 0.0111228006 0.014151500
#> [15,] 0.005294909 0.000014092450 -0.434761338 0.0010446674 0.012523695
#> [16,] 0.010326563 0.000053872400 -0.129767272 0.0039818755 0.005172051
#> [17,] 0.013040500 0.000086143349 -0.013149719 0.0063520719 0.011651571
#> [18,] 0.017524498 0.000156268541 0.134921334 0.0114641101 0.011455105
#> [19,] 0.008496106 0.000036399852 -0.224622267 0.0026938811 0.022717435
#> [20,] 0.016886267 0.000145000857 0.116507117 0.0106462358 0.013859432
#> V2_higher-energy V2_low-energy V2_sigmoid V3_high-energy
#> [1,] 0.00013052225 0.090489606 0.0095933189 0.009742111
#> [2,] 0.00002463337 -0.315044437 0.0018246450 0.013057593
#> [3,] 0.00018986990 0.182380583 0.0138951384 0.011813424
#> [4,] 0.00059995979 0.439915669 0.0426355770 0.016691842
#> [5,] 0.00008236589 -0.024356458 0.0060752093 0.052051866
#> [6,] 0.00003561591 -0.229784402 0.0026360153 0.013698622
#> [7,] 0.00008935907 -0.003987557 0.0065876424 0.017828579
#> [8,] 0.00003971977 -0.203803061 0.0029388641 0.014194821
#> [9,] 0.00002001032 -0.361056214 0.0014827105 0.005167841
#> [10,] 0.00023134388 0.229669749 0.0168794173 0.020524726
#> [11,] 0.00010832026 0.044093543 0.0079744088 0.011861946
#> [12,] 0.00011584873 0.060846110 0.0085239535 0.012082994
#> [13,] 0.00046034510 0.384974996 0.0330395867 0.013513801
#> [14,] 0.00010155952 0.028002198 0.0074803894 0.013583663
#> [15,] 0.00007940974 -0.033486728 0.0058584356 0.017583930
#> [16,] 0.00001344441 -0.444256763 0.0009966762 0.004313226
#> [17,] 0.00006867506 -0.069696130 0.0050704758 0.050236505
#> [18,] 0.00006636558 -0.078201494 0.0049007902 0.011186224
#> [19,] 0.00026396952 0.260669863 0.0192144332 0.014881396
#> [20,] 0.00009738224 0.017506924 0.0071749039 0.022796605
#> V3_higher-energy V3_low-energy V3_sigmoid V4_high-energy
#> [1,] 0.000047918922 -0.158434844 0.0035433843 0.009617056
#> [2,] 0.000086370800 -0.012490575 0.0063687376 0.023247253
#> [3,] 0.000070607685 -0.062788154 0.0052124280 0.011846275
#> [4,] 0.000141653513 0.110743198 0.0104030070 0.007451298
#> [5,] 0.001427045549 0.597245539 0.0958177994 0.008238755
#> [6,] 0.000095120219 0.011632320 0.0070094033 0.022692176
#> [7,] 0.000161787850 0.143431362 0.0118642439 0.014290101
#> [8,] 0.000102186699 0.029540122 0.0075262390 0.017058541
#> [9,] 0.000013422475 -0.444584384 0.0009950515 0.005744832
#> [10,] 0.000214999718 0.212245514 0.0157055101 0.006438592
#> [11,] 0.000071192352 -0.060734343 0.0052553643 0.015413458
#> [12,] 0.000073886756 -0.051476259 0.0054531857 0.025958483
#> [13,] 0.000092553703 0.004794361 0.0068215583 0.015054768
#> [14,] 0.000093519665 0.007390054 0.0068922659 0.025715858
#> [15,] 0.000157339613 0.136597657 0.0115417848 0.017359497
#> [16,] 0.000009342167 -0.514277940 0.0006927732 0.018086971
#> [17,] 0.001326834468 0.585400254 0.0896886205 0.012674312
#> [18,] 0.000063269593 -0.090060631 0.0046732270 0.014580375
#> [19,] 0.000112388014 0.053288411 0.0082714119 0.012798386
#> [20,] 0.000265833639 0.262309054 0.0193475159 0.034660202
#> V4_higher-energy V4_low-energy V4_sigmoid V5_high-energy
#> [1,] 0.00004669075 -0.16475654 0.003452878 0.02546449
#> [2,] 0.00027657219 0.27150521 0.020113459 0.01940534
#> [3,] 0.00007100326 -0.06139678 0.005241478 0.01763976
#> [4,] 0.00002796854 -0.28617110 0.002071180 0.01019263
#> [5,] 0.00003421931 -0.23923513 0.002532909 0.02320802
#> [6,] 0.00026337618 0.26014538 0.019172067 0.00364338
#> [7,] 0.00010357299 0.03290577 0.007627568 0.01238940
#> [8,] 0.00014800004 0.12155318 0.010864065 0.01660181
#> [9,] 0.00001659662 -0.40101902 0.001230073 0.01107152
#> [10,] 0.00002086162 -0.35196434 0.001545693 0.01652213
#> [11,] 0.00012063238 0.07091833 0.008872825 0.02267025
#> [12,] 0.00034578087 0.32240618 0.025021509 0.02250956
#> [13,] 0.00011504191 0.05910510 0.008465088 0.01313476
#> [14,] 0.00033926499 0.31813736 0.024561508 0.01703758
#> [15,] 0.00015331442 0.13023357 0.011249813 0.03062790
#> [16,] 0.00016655449 0.15053423 0.012209552 0.01122444
#> [17,] 0.00008134354 -0.02747700 0.006000251 0.02139847
#> [18,] 0.00010785476 0.04301886 0.007940410 0.02569724
#> [19,] 0.00008295423 -0.02257798 0.006118340 0.01155121
#> [20,] 0.00062184453 0.44711280 0.044122637 0.01104258
#> V5_higher-energy V5_low-energy V5_sigmoid
#> [1,] 0.000332581251 0.313658692 0.0240892080
#> [2,] 0.000191972669 0.185041380 0.0140468768
#> [3,] 0.000158349227 0.138166671 0.0116149915
#> [4,] 0.000052476961 -0.136212392 0.0038791317
#> [5,] 0.000275628738 0.270713626 0.0200462140
#> [6,] 0.000006661336 -0.573742155 0.0004940724
#> [7,] 0.000077705428 -0.038903799 0.0057334164
#> [8,] 0.000140116955 0.108049002 0.0102913160
#> [9,] 0.000061971564 -0.095198616 0.0045777878
#> [10,] 0.000138764178 0.105651141 0.0101929631
#> [11,] 0.000262861767 0.259689570 0.0191353324
#> [12,] 0.000259106920 0.256331703 0.0188671163
#> [13,] 0.000087401386 -0.009525436 0.0064442437
#> [14,] 0.000147633498 0.120942324 0.0108374486
#> [15,] 0.000483619534 0.395430370 0.0346525294
#> [16,] 0.000063705106 -0.088359257 0.0047052446
#> [17,] 0.000233898829 0.232269421 0.0170626736
#> [18,] 0.000338767725 0.317807682 0.0245263848
#> [19,] 0.000067490306 -0.074024352 0.0049834347
#> [20,] 0.000061646308 -0.096502145 0.0045538701