data(braingraphs)
### Set covars to just be group membership
covars <- matrix(c(rep(0, 19), rep(1, 19)))
### We use low numbers for speed. The exact numbers to use depend
### on the data being used, but generally the higher iters and popSize
### the longer it will take to run. earlyStop is then used to stop the
### run early if the results aren't improving.
iters <- 500
popSize <- 200
earlyStop <- 250
gaRes <- genAlg(braingraphs, covars, iters, popSize, earlyStop)
Run the code above in your browser using DataLab