Skip to content

Commit 30bf97f

Browse files
authored
Fix setorder relying on one criteria only, now three for reproducibility
1 parent e525770 commit 30bf97f

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

R/getNextParameters.R

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,13 @@ getNextParameters <- function(
1616

1717
LocalOptims <- LocalOptims[get("relUtility") >= acqThresh,]
1818
LocalOptims <- LocalOptims[,c(boundsDT$N,"gpUtility"),with=FALSE]
19-
setorder(LocalOptims,-"gpUtility")
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+
)
2026
LocalOptims$acqOptimum <- TRUE
2127

2228
# Mark clusters as duplicates if they have already been attempted. Note that

0 commit comments

Comments
 (0)