This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
waitAndSubmitExpired = function(reg, resources, wait = 30, ...) { | |
done.ids = findDone(reg) | |
error.ids = findErrors(reg) | |
expired.ids = findExpired(reg) | |
submitted.ids = findSubmitted(reg) | |
restarted.ids = numeric() | |
while (!all(submitted.ids %in% c(done.ids, error.ids))) { | |
if (length(expired.ids) > 0) | |
submitJobs(reg, expired.ids, resources = resources, ...) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(checkmate) | |
library(mlr) | |
makePersp3DLayer = function(opt.path.dt, par.set = NULL, learner, y = "y", x = NULL, resolution = 100, nrow.limit = 400) { | |
x = coalesce(x, getParamIds(par.set)) | |
assertCharacter(x, len = 2) | |
data = opt.path.dt[, c(x,y), with=FALSE] | |
if (nrow(opt.path.dt) > nrow.limit) { | |
data = data[sample(nrow(data), size = nrow.limit),] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Author: Jakob Richter (https://gist.github.com/jakob-r) | |
# colfuncMiddle does the same as colfunc but gives respect to middle point. | |
# usage: x : numeric() | |
# colfunc: function generated by colorRampPalette() | |
# zeropoint: numeric(1) | |
colfuncMiddle = function(x, colfunc, n, zeropoint=0){ | |
stopifnot(is.numeric(x) | is.factor(x)) | |
if(!missing(n)){ | |
stopifnot(length(n)==1) |
NewerOlder