The current function transforms a galgo.Obj
to a list
to_list(output)
output | An object of class |
---|
The current function restructurates a galgo.Obj
to a more
easy to understand an use list
. This output is particularly useful
if one wants to select a given solution and use its outputs in a new
classifier. The output of type list
has a length equals to the
number of solutions obtained by the galgo
algorithm.
Basically this output is a list of lists, where each element of the output
is named after the solution's name (solution.n
, where n
is
the number assigned to that solution), and inside of it, it has all the
constituents for that given solution with the following structure:
output$solution.n$Genes: A vector of the features included in the solution
output$solution.n$k: The number of partitions found in that solution
output$solution.n$SC.Fit: The average silhouette coefficient of the partitions found
output$solution.n$Surv.Fit: The survival fitness value
output$solution.n$Rank: The solution rank
CrowD: The solution crowding distance related to the rest of the solutions
#> Warning: object 'transbig' not foundexpression <- 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)#>#>#> k rnkIndex CrowD #> result.1 2 0.12942719 122.4747 1 Inf #> result.2 4 0.07083137 195.2294 1 1.0371665 #> result.4 5 0.05675895 221.9400 1 0.5267322 #> result.12 6 0.02857908 236.1127 1 Inf#>#> k rnkIndex CrowD #> result.1 2 0.12942719 122.4747 1 Inf #> result.15 8 0.03818634 316.2620 1 Inf #> result.2 4 0.07083137 195.2294 1 0.9097067 #> result.4 5 0.05675895 221.9400 1 0.6546047#>#> k rnkIndex CrowD #> result.1 2 0.12942719 122.4747 1 Inf #> result.15 8 0.03818634 316.2620 1 Inf #> result.2 4 0.07083137 195.2294 1 0.8462842 #> result.4 5 0.05675895 221.9400 1 0.6323392#>#> k rnkIndex CrowD #> result.1 2 0.12942719 122.4747 1 Inf #> result.15 8 0.03818634 316.2620 1 Inf #> 3 0.07897683 183.1320 1 0.6502882 #> result.4 5 0.05675895 221.9400 1 0.6198473 #> result.2 4 0.07083137 195.2294 1 0.2824740#>#> k rnkIndex CrowD #> result.1 2 0.12942719 122.4747 1 Inf #> result.15 8 0.03818634 316.2620 1 Inf #> 2 0.08123501 224.5801 1 1.0435306 #> 2 0.09975443 130.1886 1 0.6752811