getBestPars | R Documentation |
Returns the N parameter sets which resulted in the maximum scores from FUN
.
getBestPars(optObj, N = 1)
optObj |
An object of class |
N |
The number of parameter sets to return |
A list containing the FUN
inputs which resulted in the highest returned Score.
If N > 1, a data.table
is returned. Each row is a result from FUN
, with results ordered by
descending Score.
scoringFunction <- function(x) { a <- exp(-(2-x)^2)*1.5 b <- exp(-(4-x)^2)*2 c <- exp(-(6-x)^2)*1 return(list(Score = a+b+c)) } bounds <- list(x = c(0,8)) Results <- bayesOpt( FUN = scoringFunction , bounds = bounds , initPoints = 3 , iters.n = 2 , gsPoints = 10 ) print(getBestPars(Results))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.