GAgawdis | R Documentation |
Internal part of gawdis()
function for running genetic algorithm
GAgawdis( tr = NULL, asym.bin = NULL, ord = "podani",gr = NULL,
gr.weight = FALSE, fuzzy = NULL, getSpecDists = NULL,
f = NULL, min.weight = 0.001, max.weight = 1, maxiter = 300,
monitor = FALSE, ... )
tr |
Matrix or data frame containing the variables. Variables can be numeric, ordered, or factor. Symmetric or asymmetric binary variables should be numeric and only contain 0 and 1. Character variables will be converted to factor. NAs are tolerated. |
asym.bin |
Vector listing the asymmetric binary variables in x. |
ord |
Character string specifying the method to be used for ordinal variables (i.e. ordered). |
gr |
Vector for traits grouping, i.e. defining group of traits that are considered to be reflecting similar biological information (e.g. many leaf traits in plants covering similar information). By default each trait is treated separately ( |
gr.weight |
Option to weight traits inside the groups. By default it is set to FALSE, all traits inside the groups have the same weights, meaning that some traits will have a greater contribution within the group; TRUE means that |
fuzzy |
Vector including groups which are defining a single variable, like in the case of fuzzy coding and dummy variables. In this case, use the argument |
getSpecDists |
Allows to use own code that defines the function |
f |
This is the criteria used to equalize the contribution of traits to the multi-trait dissimilarity. It can be specified. Alternative, by default, the approach is minimizing the differences in the correlations between the dissimilarity on individual trait and the multi-trait approach. Specifically the 1/SD of correlations (SD=standard deviation) is used, i.e. all traits will tend to have a similar correlation with the multi-trait dissimilarity. opti.f is fitness function that is maximalized by genetic algorithm. |
min.weight |
Set minimum value for weights of traits. |
max.weight |
Set maximum value for weights of traits. |
maxiter |
Maximum number of iterations to run before the GA search is halted, see |
monitor |
If to monit progress of genetic algorithm. |
... |
Arguments passed to GA |
Returns 'diss' as dissimilarity, weights as solution of GA, ga as GA, spedis as species distance.
#GAgawdis() is not exptected to be run directly, but you can try it by
library(FD)
GAgawdis(dummy$trait,maxiter=100)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.