The current function transforms a galgo.Obj to a data.frame

to_dataframe(output)

Arguments

output

An object of class galgo.Obj

Value

The current function restructurates a galgo.Obj to a more easy to understand an use data.frame. The output data.frame has \( m x n\) dimensions, were the rownames (\(m\)) are the solutions obtained by the galgo algorithm. The columns has the following structure:

  1. Genes: The features included in each solution in form of a list

  2. k: The number of partitions found in that solution

  3. SC.Fit: The average silhouette coefficient of the partitions found

  4. Surv.Fit: The survival fitness value

  5. Rank: The solution rank

  6. CrowD: The solution crowding distance related to the rest of the solutions

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 output <- GSgalgoR::galgo(generations = 5, population = 15, prob_matrix = expression, OS = OS)
#> Using CPU for computing pearson distance
#> Generation 1 Non-dominated solutions:
#> k rnkIndex CrowD #> result.6 2 0.13475022 75.17647 1 Inf #> result.8 6 0.08097386 221.10851 1 Inf
#> Generation 2 Non-dominated solutions:
#> k rnkIndex CrowD #> result.6 2 0.13475022 75.17647 1 Inf #> result.8 6 0.08097386 221.10851 1 Inf #> result.6 2 0.13067741 115.20417 1 1.118927
#> Generation 3 Non-dominated solutions:
#> k rnkIndex CrowD #> result.8 6 0.08097386 221.10851 1 Inf #> 2 0.15772653 35.86713 1 Inf #> result.6 2 0.13067741 115.20417 1 1.0597222 #> result.6 2 0.13475022 75.17647 1 0.5630868
#> Generation 4 Non-dominated solutions:
#> k rnkIndex CrowD #> 2 0.15772653 35.86713 1 Inf #> 7 0.02010858 231.07312 1 Inf #> result.8 6 0.08097386 221.10851 1 1.1840778 #> result.6 2 0.13067741 115.20417 1 0.8233753 #> 2 0.13569288 111.35387 1 0.5206216
#> Generation 5 Non-dominated solutions:
#> k rnkIndex CrowD #> 2 0.15772653 35.86713 1 Inf #> 7 0.01589945 255.30887 1 Inf #> result.8 6 0.08097386 221.10851 1 1.1466026 #> result.6 2 0.13067741 115.20417 1 0.7878776 #> 7 0.02010858 231.07312 1 0.5318530 #> 2 0.13569288 111.35387 1 0.4949618
outputDF <- to_dataframe(output) outputList <- to_list(output)