fitnessFunction: Function to sample items with a genetic algorithm maximizing...

Description Usage Arguments Value

Description

Function to sample items with a genetic algorithm maximizing some measure of fitness (e.g., everage inter-item dissimilarity) as measured by an inter-item distance matrix.

Usage

1
2
fitnessFunction(x, sample_size, distance_mat,
  lower_tri_function = sumHeight, required_items = NULL)

Arguments

x

a binary vector of sampled items

sample_size

the number of items to sample

distance_mat

a population inter-item distance matrix

required_items

character vector of any items required to be included in the solution

lower_tri_funciton

the specific function to assess fitness of the lower triangle of the sample distance matrix

Value

a value representing the fitness of the current sample


damiencrone/gasample documentation built on May 20, 2019, 9:26 a.m.