Description Usage Arguments Value Author(s) Examples

View source: R/GenAlgForSubsetSelectionMONoTest.R

It uses a nondominated selection genetic algorithm to find the solutions on the frontier that optimizes several design criteria at the same time. The test set is taken as the complement of the training individuals.

1 2 3 4 5 6 | ```
GenAlgForSubsetSelectionMONoTest(Pcs = NULL, Dist = NULL, Kernel = NULL, Candidates,
ntoselect, selectionstats, selectionstatstypes,
plotdirections, npopGA = 100, mutprob = 0.8,
mutintensity = 1, nitGA = 500, lambda = 1e-06,
plotiters = FALSE, mc.cores = 1, InitPop = NULL, C =
NULL, axes.labels = NULL)
``` |

`Pcs` |
Principal components matrix for the individuals |

`Dist` |
Distance matrix for the individuals |

`Kernel` |
Kernel matrix for the individuals |

`Candidates` |
The set of individuals from which the training set is selected. |

`ntoselect` |
number of individuals to select in the training set. |

`selectionstats` |
a vector of design optimization criteria |

`selectionstatstypes` |
a vector describing the type of optimality criteria used in |

`plotdirections` |
A vector that is used to change the sign of statistics while plotting. This doesnt effect the optimization. |

`npopGA` |
genetic algorithm parameter, number of solutions at each iteration |

`mutprob` |
genetic algorithm parameter, probability of mutation for each generated solution. |

`mutintensity` |
genetic algorithm parameter, mean of the poisson variable that is used to decide the number of mutations for each cross. |

`nitGA` |
genetic algorithm parameter, number of iterations. |

`lambda` |
scalar shrinkage parameter ( |

`plotiters` |
plot the convergence: TRUE or FALSE. Default is TRUE. |

`mc.cores` |
number of cores to use. |

`InitPop` |
a list of initial solutions |

`C` |
Contrast Matrix. |

`axes.labels` |
Labels for the axes for plotting iterations |

A list of length 2. The first item in the list is the list of solutions found by the algorithm. The second item is a matrix of criteria values for the solutions in the first list.

Deniz Akdemir

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | ```
## Not run:
library(STPGA)
library(GenomicMating)
data(WheatData)
Msvd<-svd(scale(Wheat.M, scale=F, center=T), nu=50, nv=50)
Dgeno<-as.matrix(dist(scale(Wheat.M, scale=F, center=T)))^2
P<-Wheat.M%*%Msvd$v
dim(P)
rownames(Dgeno)<-colnames(Dgeno)<-rownames(P)<-rownames(Wheat.M)
test<-sample(rownames(P), 25)
candidates<-setdiff(rownames(P), test)
outnewprog<-GenAlgForSubsetSelectionMONoTest(Pcs=P,Dist=Dgeno,
Candidates=candidates,ntoselect=75,
selectionstats=list("DOPT", "neg_dist_in_train2", "dist_to_test2"),
selectionstatstypes=c("Pcs", "Dist", "Dist"),
plotdirections=c(1,1,1),npopGA=300,
mutprob=1, mutintensity=2, nitGA=100,
plotiters=TRUE, mc.cores=1, InitPop=NULL)
#####Best solution according to ideal solution concept
outnewprog[[1]][[which.min(disttoideal(outnewprog[[2]]))]]
## End(Not run)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.