| ppa.normalize | R Documentation |
Normalize the two input matrices and store them in a form that can be used effectively to perform the Ping-Pong Algorithm
## S4 method for signature 'list' ppa.normalize(data, ...)
data |
A list of two numeric matrices, with matching number of
columns. They might contain |
... |
Additional arguments, see details below. |
This function can be called as
isa.normalize(data, prenormalize = FALSE)
where the arguments are:
A list of two numeric matrices, with matching number of
columns. They might contain Na and/or NaN values.
Logical scalar, see details below.
It was observed that the PPA works best if the input matrices are scaled to have mean zero and standard deviation one.
A PPA step consist of four matrix-multiplications and this requires four different matrices, each of the two input matrices scaled row-wise and column-wise.
If the prenormalized argument is set to TRUE, then
row-wise scaling is calculated on the column-wise scaled matrices and
not on the raw input.
A list of four matrices, the first two corresponds to the first input matrix, the second two to the second matrix.
Gabor Csardi Gabor.Csardi@unil.ch
Kutalik Z, Bergmann S, Beckmann, J: A modular approach for integrative analysis of large-scale gene-expression and drug-response data Nat Biotechnol 2008 May; 26(5) 531-9.
See ppa for an easy way of running the PPA
## In-silico data
set.seed(1)
insili <- ppa.in.silico()
nm <- ppa.normalize(insili[1:2])
## Check it
max(abs(rowSums(nm[[1]])))
max(abs(rowSums(nm[[2]])))
max(abs(rowSums(nm[[3]])))
max(abs(rowSums(nm[[4]])))
max(abs(rowSums(nm[[1]])))
max(abs(rowSums(nm[[2]])))
max(abs(rowSums(nm[[3]])))
max(abs(rowSums(nm[[4]])))
## Plot them
if (interactive()) {
layout(rbind(1:3,4:6))
image(insili[[1]], main="Original data 1")
image(t(nm[[1]]), main="Row normalized 1")
image(nm[[2]], main="Column normalized 1")
image(insili[[2]], main="Original data 2")
image(t(nm[[3]]), main="Row normalized 2")
image(nm[[4]], main="Column normalized 2")
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.