Description Usage Arguments Value Examples
View source: R/callback-functions.R
A base callback function that returns a galgo.Obj
1 2 | callback_base_return_pop (userdir = "",generation, pop_pool,
pareto, prob_matrix, current_time)
|
userdir |
the default directory used by 'galgo()' to store files |
generation |
a number indicating the number of iterations of the galgo algorithm |
pop_pool |
a |
pareto |
the solutions found by Galgo across all generations in the solution space |
prob_matrix |
a |
current_time |
an |
an object of class galgo
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | # 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 with base_return_pop_callback assigned to the end_galgo_callback
# hook-point
# By using this callback galgo() return a `galgo,Obj` object.
output <- GSgalgoR::galgo(generations = 5,
population = 15,
prob_matrix = expression,
OS = OS,
end_galgo_callback = callback_base_return_pop
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.