11# ' @importFrom dbscan dbscan
2- # ' @importFrom data.table fintersect uniqueN setorder
2+ # ' @importFrom data.table fintersect uniqueN .SD
33getNextParameters <- function (
44 LocalOptims
55 , boundsDT
@@ -15,23 +15,21 @@ getNextParameters <- function(
1515) {
1616
1717 LocalOptims <- LocalOptims [get(" relUtility" ) > = acqThresh ,]
18- LocalOptims <- LocalOptims [,c(boundsDT $ N ," gpUtility" ),with = FALSE ]
19-
20- # using only one criteria to sort leads to not reproducible order
21- setorder(
22- LocalOptims ,
23- cols = c(" gpUtility" , " Score" , " inBounds" ),
24- order = c(- 1 , - 1 , - 1 )
25- )
18+ LocalOptims <- LocalOptims [
19+ ,
20+ .SD ,
21+ .SDcols = c(boundsDT $ N ," gpUtility" )
22+ ]
23+
2624 LocalOptims $ acqOptimum <- TRUE
2725
2826 # Mark clusters as duplicates if they have already been attempted. Note that
2927 # parameters must match exactly. Whether or not we should eliminate 'close'
3028 # parameters is experimental, and could cause problems as the parameter space
3129 # becomes more fully explored.
3230 LocalOptims $ Duplicate <- checkDup(
33- LocalOptims [,boundsDT $ N ,with = FALSE ]
34- , scoreSummary [,boundsDT $ N ,with = FALSE ]
31+ LocalOptims [, boundsDT $ N , with = FALSE ]
32+ , scoreSummary [, boundsDT $ N , with = FALSE ]
3533 )
3634
3735 # If we already have runNew non-duplicate local optims, use the best of those.
0 commit comments