Sometimes points in a map optimization run get trapped in local optima, this function tries to combat this by doing a grid search for each point individually moving points if a better optima is found. Note that this only performs grid searches individually so won't find cases where a group of points are trapped together in a local optima.

moveTrappedPoints(
  map,
  optimization_number = 1,
  grid_spacing = 0.25,
  max_iterations = 10,
  options = list()
)

Arguments

map

The acmap data object

optimization_number

The map optimization number to apply it to

grid_spacing

Grid spacing in antigenic units of the search grid to use when searching for more optimal positions

max_iterations

The maximum number of iterations of searching for trapped points then relaxing the map to be performed

options

List of named optimizer options, see RacOptimizer.options()

Value

Returns the acmap object with updated coordinates (if any trapped points found)

Details

The search is iterative, searching for and moving points that are found to be trapped before relaxing the map and searching again, stopping either when no more trapped points are found or max_iterations is reached.

See also

Other map optimization functions: RacOptimizer.options(), make.acmap(), optimizeMap(), randomizeCoords(), relaxMapOneStep(), relaxMap()