Description Usage Arguments Value Examples
View source: R/sumProbability.R
Compartment levels classifications on the test data are summed up to associated neighborhood levels. It is a helper function.
1 |
df |
data.frame; test data classifications at the neighborhood level and probablity vectors for each protein. |
summed.df
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | {
#create mock data
df <- data.frame(Protein = "TP53",
svm.pred = "N1",
S1 = as.numeric(0.02),
S2 = as.numeric(0.02),
S3 = as.numeric(0.02),
S4 = as.numeric(0.02),
N1 = as.numeric(0.72),
N2 = as.numeric(0.02),
N3 = as.numeric(0.02),
N4 = as.numeric(0.02),
C1 = as.numeric(0.02),
C2 = as.numeric(0.02),
C3 = as.numeric(0.02),
C4 = as.numeric(0.02),
C5 = as.numeric(0.02),
M1 = as.numeric(0.02),
M2 = as.numeric(0.02))
rownames(df) <- "TP53"
sum.df <- sumProbability(df)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.