Description Usage Arguments Details Value Author(s) See Also Examples
Creates and configure all objects needed for a “variable selection for classificacion” problem. It configures Gene, Chromosome, Niche, World, Galgo and BigBang objects.
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 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 | configBB.VarSel(
file=NULL,
data=NULL,
classes=NULL,
train=rep(2/3,333),
test=1-train,
force.train=c(),
force.test=c(),
train.cases=FALSE,
main="project",
classification.method=c("knn","mlhd","svm","nearcent",
"rpart","nnet","ranforest","user"),
classification.test.error=c(0,1),
classification.train.error=c("kfolds","splits","loocv","resubstitution"),
classification.train.Ksets=-1,
classification.train.splitFactor=2/3,
classification.rutines=c("C","R"),
classification.userFitnessFunc=NULL,
scale=(classification.method[1] %in% c("knn","nearcent","mlhd","svm")),
knn.k=3,
knn.l=1,
knn.distance=c("euclidean", "maximum", "manhattan",
"canberra", "binary", "minkowski", "pearson", "kendall", "spearman",
"absolutepearson","absolutekendall", "absolutespearman"),
nearcent.method=c("mean","median"),
svm.kernel=c("radial","polynomial","linear","sigmoid"),
svm.type=c("C-classification", "nu-classification", "one-classification"),
svm.nu=0.5,
svm.degree=4,
svm.cost=1,
nnet.size=2,
nnet.decay=5e-4,
nnet.skip=TRUE,
nnet.rang=0.1,
geneFunc=runifInt,
chromosomeSize=5,
populationSize=-1,
niches=1,
worlds=1,
immigration=c(rep(0,18),.5,1),
mutationsFunc=function(ni) length(ni),
crossoverFunc=function(ni) round(length(ni)/2,0),
crossoverPoints=round(chromosomeSize/2,0),
offspringScaleFactor=1,
offspringMeanFactor=0.85,
offspringPowerFactor=2,
elitism=c(rep(1,9),.5),
goalFitness=0.90,
galgoVerbose=20,
maxGenerations=200,
minGenerations=10,
galgoUserData=NULL,
maxBigBangs=1000,
maxSolutions=1000,
onlySolutions=FALSE,
collectMode="bigbang",
bigbangVerbose=1,
saveFile="?.Rdata",
saveFrequency=50,
saveVariable="bigbang",
callBackFuncGALGO=function(...) 1,
callBackFuncBB=plot,
callEnhancerFunc=function(chr, parent) NULL,
saveGeneBreaks=NULL,
geneNames=NULL,
sampleNames=NULL,
bigbangUserData=NULL
)
|
file |
The file containing the data. First row should be sample names. First column should be variable names (genes). Second row must be the class for every sample if |
data |
If a file is not provided, |
classes |
if a file is not provided, specifies the classes for the data. If the |
train |
A vector of the proportion of random samples to be used as training sets. The number of sets is determined by the length of |
test |
A vector of the proportion of random samples to be used as testing sets. The number of sets is determined by the length of |
force.train |
A vector with sample indexes forced to be part of all training sets. |
force.test |
A vector with sample indexes forced to be part of all test sets. |
train.cases |
If TRUE, the same number of cases for each class. If numeric vector, then it is interpreted as the number of samples in training per class |
main |
A string or ID related to your project that will be used in all plots and would help you to distinguish results from different studies. |
classification.method |
The method to be used for classification. The current available methods (in this package) are |
classification.test.error |
Vector of two weights specifing how the fitness function is evaluated to compute the test error. The first value is the weight of training and the second the weight of test. The default is c(0,1) which consider only test error. The sum of this values should be 1. |
classification.train.error |
Specify how the training set is divided to compute the error in the training set (in |
classification.train.Ksets |
The number of training set folds/splits. Negative means automatic detection (n=samples, max(min(round(13-n/11),n),3)). |
classification.train.splitFactor |
When |
classification.rutines |
For most of the methods, |
classification.userFitnessFunc |
For |
scale |
|
knn.k |
For KNN method, |
knn.l |
For KNN method, |
knn.distance |
The distance to be used in KNN method. Possible values are |
nearcent.method |
For nearest centroid method, |
nnet.size |
Parameter passed to nnet. |
nnet.decay |
Parameter passed to nnet. |
nnet.skip |
Parameter passed to nnet. |
nnet.rang |
Parameter passed to nnet. |
svm.kernel |
For SVM (support vector machines) method, specify the kernel method |
svm.type |
For SVM method, specify the type of classificacion. |
svm.nu |
For SVM method and |
svm.degree |
For SVM method and |
svm.cost |
For SVM method, specify the |
nnet. |
Parameters for neural networks classification. See |
geneFunc |
The function that provides random values for genes. The default is runifInt, which generates a random integer value with a uniform distribution. |
chromosomeSize |
Specify the chromosome size (the number of variables/genes to be included in a model). Defaults to 5. See |
populationSize |
Specify the number of chromosomes per niche. Defaults is min(20,20+(2000-nrow(data))/400). See |
niches |
Specify the number of niches. Defaults to 2. See |
worlds |
Specify the number of worlds. Defaults to 1. See |
immigration |
Specify the migration criteria. |
mutationsFunc |
Specify the function that returns the number of mutations to perform in the population. |
crossoverFunc |
Specify the function that returns the number of crossover to perform. The default is the length of the niche divided by 2. |
crossoverPoints |
Specify the active positions for crossover operator. Defaults to a single point in the middle of the chromosome. See |
offspringScaleFactor |
Scale factor for offspring generation. Defaults 1. See |
offspringMeanFactor |
Mean factor for offspring generation. Defaults to 0.85. See |
offspringPowerFactor |
Power factor for offspring generation. Defaults to 2. See |
elitism |
Elitism probability/flag/vector. Defaults to c(1,1,1,1,1,1,1,1,1,0.5) (elitism present for 9 generations followed by a 50% chance, then repeated). See |
goalFitness |
Specify the desired fitness value (fraction of correct classification). Defaults to 0.90. See |
galgoVerbose |
|
maxGenerations |
Maximum number of generations. Defaults to 200. See |
minGenerations |
Minimum number of generations. Defaults to 10. See |
galgoUserData |
Additional user data for the |
maxBigBangs |
Maximum number of bigbang cycles. Defaults to 1000. See |
maxSolutions |
Maximum number of solutions collected. Defaults to 1000. See |
onlySolutions |
Save only when a solution is reach. Defaults to FALSE (to use all the information, then a filter can be used afterwards). See |
collectMode |
information to collect. Defaults to |
bigbangVerbose |
Verbose flag for |
saveFile |
File name where the data is saved. Defaults to |
saveFrequency |
How often the “current” solutions are saved. Defaults to 50. See |
saveVariable |
Internal |
callBackFuncGALGO |
|
callBackFuncBB |
|
callEnhancerFunc |
|
saveGeneBreaks |
|
geneNames |
The gene (variable) names if they differ from the first column in |
sampleNames |
The sample names if they differ from first row in |
bigbangUserData |
Additional user data for |
Wrapper function. Configure all objects from parameters.
A ready to use bigbang object.
*** TO DO: EXPLAIN THE STRUCTURE OF "DATA" ***
Victor Trevino
1 2 3 4 5 6 | ## Not run:
bb <- configBB.VarSel(...)
bb
blast(bb)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.