crossover_func: Crossover Function

Description Usage Arguments Value Examples

View source: R/crossover_func.R

Description

Performs crossover between two models. Internal use only.

Usage

1
crossover_func(crossover_matrix_row, Kvar, Kint, pc)

Arguments

crossover_matrix_row

Vector containing both parent models.

Kvar

Maximum number of variables allowed in the final model

Kint

Maximum number of interactions allowed in the final model

pc

Legacy variable (equal to 0.5)

Value

Vector containing two children models.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
p1 <- c("x1","0","x4","x3","0","x8","1","0","0","0","0","1")
p2 <- c("x1","x2","x4","x7","0","x8","1","0","1","1","0","0")
crossover_matrix_row <- c(p1,p2)
Kvar <- 6
Kint <- 0
pc <- 0.5

## Not run: 
crossover_func(crossover_matrix_row,Kvar,Kint,pc)

## End(Not run)

markcus1/gagam documentation built on April 16, 2020, 11:50 a.m.