parsimony_rerank: Function for reranking by complexity in parsimonious model...

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/parsimony_functions.R

Description

Promotes models with similar fitness but lower complexity to top positions.

Usage

1
parsimony_rerank(object, verbose=FALSE, ...)

Arguments

object

An object of class "ga_parsimony" resulting from a call to function ga_parsimony with keep_history parameter set to TRUE.

verbose

If it is TRUE shows additional information.

...

Further arguments passed to or from other methods.

Details

This method corresponds with the second step of parsimonious model selection (PMS) procedure. PMS works in the following way: in each GA generation, best solutions are first sorted by their cost, J. Then, in a second step, individuals with less complexity are moved to the top positions when the absolute difference of their J is lower than a object@rerank_error threshold value. Therefore, the selection of less complex solutions among those with similar accuracy promotes the evolution of robust solutions with better generalization capabilities.

Value

Return a vector with the new position of the individuals.

Author(s)

Francisco Javier Martinez de Pison. fjmartin@unirioja.es. EDMANS Group. http://www.mineriadatos.com

See Also

ga_parsimony

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
library(GAparsimony)
object <- new("ga_parsimony", 
              rerank_error=0.2,
              best_score = 2.0,
              popSize = 4, 
              fitnessval = c(2.0, 1.9, 1.1, 1.0), 
              complexity=c(2,1,2,1))

pop_ini <- data.frame(fitnessval=object@fitnessval, 
                      complexity=object@complexity)
print("INITIAL POPULATION:")
print(pop_ini)

print("POPULATION ORDERED BY COMPLEXITY")
print(paste0("WHEN abs(diff(fitnessval)) < ",
             object@rerank_error,":"))
pop_ini[parsimony_rerank(object),]

GAparsimony documentation built on Dec. 3, 2019, 5:07 p.m.