sampleItems: 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., average inter-item dissimilarity) as measured by an inter-item distance matrix.

Usage

1
2
3
4
sampleItems(distance_mat, sample_size, fitness = fitnessFunction,
  lower_tri_funciton = sumHeight, n_suggestions = 500,
  maxiter = 1e+06, run = 200, required_items = NULL, seed = NULL,
  suggest_maxmin = TRUE)

Arguments

distance_mat

a population inter-item distance matrix

sample_size

the number of items to sample

fitness

a fitness function to pass to ga()

lower_tri_funciton

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

n_suggestions

number of suggestions to initialise the GA with

maxiter

maximum number of iterations to run GA

required_items

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

seed

seed for GA

suggest_maxmin

logical denoting whether to include greedy search for the items that maximise minimum inter item distance in the initial suggestions

Value

a list containing the final items and a GA object


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