Description Usage Arguments Details Value See Also Examples
Optimize both prosecution and defence likelihoods, returning the weight of evidence.
1 2 |
P.pars |
Parameters for prosecution hypothesis, as generated by optimisation.params. |
D.pars |
Parameters for prosecution hypothesis, as generated by optimisation.params. |
tolerance |
Tolerance for the final chunk of optimisation. If the relative difference between the current result, and the last checked result is less than this value, then it is classed as converged. |
n.steps |
Number of steps to run. Defaults to NULL. if n.steps is NULL , the number of steps to run is determined by the mean of the standard deviation of the initial phase of the intial chunk of optimisation for prosecution and defence. |
progBar |
Logical, stating whether to display a graphical progress basr or not. This should be set to FALSE is the user does not have graphical capabilities e.g. if running from command line on a server. |
interim |
Logical, stating whether or not to generate interim reports. If set to TRUE a basic set of results after each step is output to "Interim.csv", and an image of the content of evaluate() or evaluate.from.interim() "interim.RData" are both stored in the current working directory. The latter can be used by evaluate.from.interim() to continue an evaluation from its previous state. Each step will write over the results from the previous step. |
CR.start |
Numerical, between 0 and 1, used by DEoptim as CR argument, at the start of the search. Gradually moves towards CR.end to allow a broader initial search, gradually becoming more localised in parameter space. See DEoptim for further details. |
CR.end |
Numerical, between 0 and 1,see details for CR.start. |
seed.input |
An integer that should be specified if the user wishes to set a particular seed. If not specified, the program sets the seed to an integer representation of the present time, date and process ID. |
Optimize over parameter space, using a geometric progression of crossover rate and tolerance. Both prosecution and defence cases are optimized simultaneously.
A list containing five elements:
Pros |
Prosecution results, structured as results from DEoptim::DEoptim. |
Def |
Defence results, structured as results from DEoptim::DEoptim. |
WoE |
WoE for each chunk. The final value if the final WoE. |
seed.used |
Seed that is set at the beginning of computation. |
seed.input |
Seed that is input by the user. |
DEoptim,DEoptimLoop
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | ## Not run:
# datapath to example files
datapath = file.path(system.file("extdata", package="likeLTD"),"hammer")
# File paths and case name for allele report
admin = pack.admin.input(
cspFile = file.path(datapath, 'hammer-CSP.csv'),
refFile = file.path(datapath, 'hammer-reference.csv'),
caseName = "hammer",
kit= "SGMplus"
)
# Enter arguments
args = list(
nUnknowns = 1,
doDropin = FALSE,
ethnic = "EA1",
adj = 1,
fst = 0.02,
relatedness = c(0,0)
)
# Create hypotheses
hypP = do.call(prosecution.hypothesis, append(admin,args))
hypD = do.call(defence.hypothesis, append(admin,args))
# Get parameters for optimisation
paramsP = optimisation.params(hypP)
paramsD = optimisation.params(hypD)
# Run optimisation
# n.steps set for demonstration purposes
results = evaluate(paramsP, paramsD, n.steps=1)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.