Description Usage Arguments Value Examples
View source: R/results-functions.R
Classify samples from multiple centroids
1 | classify_multiple(prob_matrix, centroid_list, distancetype = "pearson")
|
prob_matrix |
a |
centroid_list |
a |
distancetype |
a |
Returns a data.frame
with the classes assigned to
each sample in each signature, were samples are a rows and signatures
in columns
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 27 28 29 30 31 | # load example dataset
library(breastCancerTRANSBIG)
data(transbig)
Train <- transbig
rm(transbig)
expression <- Biobase::exprs(Train)
clinical <- Biobase::pData(Train)
OS <- survival::Surv(time = clinical$t.rfs, event = clinical$e.rfs)
# We will use a reduced dataset for the example
expression <- expression[sample(1:nrow(expression), 100), ]
# Now we scale the expression matrix
expression <- t(scale(t(expression)))
# Run galgo
output <- GSgalgoR::galgo(generations = 5, population = 15,
prob_matrix = expression, OS = OS)
outputDF <- to_dataframe(output)
outputList <- to_list(output)
RESULTS <- non_dominated_summary(
output = output, OS = OS,
prob_matrix = expression,
distancetype = "pearson"
)
CentroidsList <- create_centroids(output, RESULTS$solution,
trainset = expression)
classes <- classify_multiple(prob_matrix = expression,
centroid_list = CentroidsList)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.