I hereby claim:
- I am jakob-r on github.
- I am jakobr (https://keybase.io/jakobr) on keybase.
- I have a public key ASA0uw1eePgkoFeZK9YbYrkjVOld8XKdql-qIFLAALvwWwo
To claim this, I am signing this object:
library(paradox) | |
library(R6) | |
library(mlr3) | |
# Partial Least Squares Regression | |
LearnerRegrPls = R6Class("LearnerRegrPls", | |
inherit = LearnerRegr, | |
public = list( |
library(covid19germany) # https://github.com/nevrome/covid19germany | |
library(data.table) | |
library(sf) | |
library(lubridate) | |
library(checkmate) | |
library(mlr3misc) | |
library(ggplot2) | |
library(plotly) | |
library(leaflet) |
javascript:(function()%7Bvar%20els%20%3D%20document.getElementsByClassName('collapse')%3Bfor%20(var%20i%20%3D%201%3B%20i%20%3C%20els.length%3B%20i%2B%2B)%20%7Bels%5Bi%5D.style.setProperty('display'%2C%20'block'%2C%20'important')%3B%7D%7D)() |
\documentclass{beamer} | |
\usepackage[absolute,overlay]{textpos} | |
\usepackage{import} | |
\setbeamercolor{background canvas}{bg=gray} | |
\setkeys{Gin}{width=\linewidth} % default of includegraphics width | |
\begin{document} |
#' @title Build ensemble of multiple learners with sampled hyperparameters. | |
#' | |
#' @description | |
#' Define a learner and define which hyperparameters should get sampled. | |
#' The ensemble will be build of multiple learners, each with different random hyperparamters. | |
#' The predictions for mean and se will be averaged. | |
#' | |
#' @template arg_learner | |
#' @param samplers (`list`)\cr | |
#' A named list of functions that create the random samples: |
I hereby claim:
To claim this, I am signing this object:
n = 5 | |
x = runif(1000 * n) | |
mat = matrix(x, ncol = n) | |
mat2 = apply(mat, 1, function(x) { | |
ox = order(x) | |
rox = match(x, x[ox]) | |
dx = diff(c(0,x[ox])) | |
dx[rox] | |
}) | |
mat2 = t(mat2) |
library(mlrMBO) | |
library(stringi) | |
library(jsonlite) | |
# read command line args (in a not very safe way) | |
# Script can be called like that: | |
# Rscript runMBO.R iters=20 time=10 seed=1 | |
args = commandArgs(TRUE) | |
# defaults: | |
iters = 50 |
library(mlrMBO) | |
library(data.table) | |
library(ggplot2) | |
configureMlr(on.par.without.desc = "warn") | |
set.seed(1) | |
# Define objective function | |
fn = makeRosenbrockFunction(5) | |
# define mbo control object | |
ctrl = makeMBOControl(propose.points = 4, store.model.at = 0:20) |
surrogate.learner = makeLearner("regr.randomForest", predict.type = "se") | |
myTrafo = function(data, target, category, na.val) { | |
catf("run mytrafon on data with") | |
data.notarget = data[, colnames(data) != target, drop = FALSE] | |
data = cbind(dcast(data.notarget, as.formula(paste0("seq_along(", category, ")~",category)), fill = na.val, value.var = "x", drop = FALSE)[, -1, drop = FALSE], data[,colnames(data) %in% c(category, target), drop = FALSE]) | |
return(data) | |
} | |
wrpTrain = function(data, target, args) { | |
data = myTrafo(data = data, target = target, category = args$category, na.val = args$na.val) |