optimizeByLOESS: optimizeByLOESS function

Description Usage Arguments Details Value

View source: R/OptimizeByLOESS.R

Description

function to optimize a two-part strategy breeding scheme: 1. Simulate a batch using given percentage ranges 2. Perform LOESS fit to the gains 3. Find budget with best estimated gain 4. Calculate new percentage ranges: any simulation within 2*StdErr of best 5. Decide on some simulations to repeat: 1. Parameter space with high gain and high std err: need more info there 2. Parameter space with high gain: high probability that it's best Go back to 1.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
optimizeByLOESS(
  batchSize,
  nByPareto = round(batchSize * 0.7),
  targetBudget,
  percentRanges,
  startCycle,
  tolerance,
  baseDir = NULL,
  maxNumBatches = 10,
  initializeFunc,
  productPipeline,
  populationImprovement,
  bsp,
  randomSeed = 1234,
  nCores = 1
)

Arguments

batchSize

Integer number of simulations between LOESS fits

targetBudget

Numeric value that you want the budget adjusted to

percentRanges

Numeric matrix (nStages + 1 rows and 2 columns) of percentage budget allocation to crossing (F1) and all of the stages. If there is a stage that is genotyped, the genotyping cost is added to that stage

startCycle

Integer the start cycle from which to measure gain. The end cycle will be the last cycle. Set the startCycle so there is enough burn-in

tolerance

Numerical difference between min amd max percentage budgets for all stages

baseDir

Directory if you want to have progress saved by batch. Relative to R working directory. If not empty string, include final /

maxNumBatches

Integer to stop the simulations eventually if the algorithm is not narrowing in on optimal parameter values

initializeFunc

Function for runBreedingScheme

productPipeline

Function for runBreedingScheme

populationImprovement

Function for runBreedingScheme

bsp

A list of breeding scheme parameters.

randomSeed

Integer seed for random number generator

nCores

Integer number of cores to use for parallel simulation

Details

A wrapper to repeatedly simulate a scheme with different budget allocations to find optimal allocations

Value

Numeric matix with all simulations budget allocations, gen mean change, gen std dev change, total cost.


jeanlucj/AlfSimHlpR documentation built on Nov. 7, 2021, 5:10 p.m.