Skip to contents

This function normalizes an energy matrix by applying logarithmic transformation and scaling.

Usage

norm_energy_matrix(
  x,
  dataset_x = x,
  min_energy = -7,
  q = 1,
  norm_energy_max = 10
)

Arguments

x

The input matrix to be normalized.

dataset_x

The reference dataset matrix used for normalization.

min_energy

The minimum energy value to be assigned after normalization. Default is -7.

q

The quantile value used for calculating the maximum value in the reference dataset. Default is 1.

norm_energy_max

The maximum value to which the normalized energy values are scaled. Default is 10.

Value

A normalized energy matrix with the same dimensions as the input matrix.

Examples

data <- matrix(rnorm(100), nrow = 10)
norm_energy_matrix(data, data)
#>              V1          V2        V3        V4         V5        V6        V7
#>  [1,]  3.894099  5.24150689  6.299194  2.753503  9.0226120  5.669259  9.227924
#>  [2,]  7.894080  1.25785802  2.090014  6.741797  2.1129913  3.565383  7.238985
#>  [3,]  7.183721  0.06799803  3.628382  9.425710  1.8016233  3.522960  9.647793
#>  [4,] 10.000000  0.00000000  4.453569  1.886522  7.0990548  4.144761  5.090165
#>  [5,]  4.573022  2.89198937  6.628379  3.999544  0.3709544 10.000000  0.000000
#>  [6,]  7.665397  9.66243541  4.367317 10.000000  1.2040490  7.776193  9.590244
#>  [7,]  0.000000  6.26911058  4.285339  0.000000  6.0624702  7.378142  5.875208
#>  [8,]  2.505933  2.29099182 10.000000  7.407456 10.0000000  0.000000  2.739311
#>  [9,]  8.001040  3.82439471  0.000000  3.372390  2.7326855  8.613213  7.905219
#> [10,]  4.377527 10.00000000  6.326784  2.854541  0.0000000  6.429573 10.000000
#>              V8         V9       V10
#>  [1,]  7.608485  0.0000000 10.000000
#>  [2,]  3.141266  7.2450865  6.395896
#>  [3,]  7.993294  0.5708812  3.018170
#>  [4,] 10.000000  3.5571808  1.295725
#>  [5,]  3.464934  6.3993598  5.177916
#>  [6,]  4.379028  3.7128909  0.000000
#>  [7,]  2.061447  0.4121674  5.404663
#>  [8,]  4.411865  1.2923812  4.474821
#>  [9,]  6.449413 10.0000000  8.361807
#> [10,]  0.000000  6.0051530  4.823073