A default call_back function that does nothing.

default_callback(
  userdir = "",
  generation,
  pop_pool,
  pareto,
  prob_matrix,
  current_time
)

Arguments

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 data.frame with the solution vectors, number of clusters and their ranking.

pareto

the solutions found by Galgo across all generations in the solution space

prob_matrix

a matrix or data.frame. Must be an expression matrix with features in rows and samples in columns

current_time

an POSIXct object

Examples

# load example dataset library(breastCancerTRANSBIG) data(transbig) Train <- transbig rm(transbig)
#> Warning: object 'transbig' not found
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 default_callback assigned to all the hook-points galgoR::galgo(generations = 5, population = 15, prob_matrix = expression, OS = OS, start_galgo_callback = default_callback, # When Galgo is about to start. end_galgo_callback = default_callback, # When Galgo is about to finish. start_gen_callback = default_callback, # At the beginning of each generation/iteration. end_gen_callback = default_callback, # At the end of each generation/iteration. )
#> Using CPU for computing pearson distance
#> Generation 1 Non-dominated solutions:
#> k rnkIndex CrowD #> result.1 2 0.13820096 139.3294 1 Inf #> result.5 9 0.02957247 306.9323 1 Inf #> result.13 2 0.06096262 155.4601 1 1.423909
#> Generation 2 Non-dominated solutions:
#> k rnkIndex CrowD #> result.1 2 0.13820096 139.3294 1 Inf #> result.5 9 0.02957247 306.9323 1 Inf #> result.9 2 0.12893556 217.2990 1 1.334205
#> Generation 3 Non-dominated solutions:
#> k rnkIndex CrowD #> result.5 9 0.02957247 306.9323 1 Inf #> 2 0.15361747 200.8407 1 Inf #> result.9 2 0.12893556 217.2990 1 1.246685
#> Generation 4 Non-dominated solutions:
#> k rnkIndex CrowD #> result.5 9 0.02957247 306.9323 1 Inf #> 2 0.15361747 200.8407 1 Inf #> result.9 2 0.12893556 217.2990 1 1.181198
#> Generation 5 Non-dominated solutions:
#> k rnkIndex CrowD #> result.5 9 0.02957247 306.9323 1 Inf #> 2 0.17671211 231.1517 1 Inf
#> NULL