This choropleth encodes unemployment rates from 2008 with a quantize scale ranging from 0 to 15%. A threshold scale is a useful alternative for coloring arbitrary ranges.
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
# due to balandat | |
from botorch.models import SingleTaskGP | |
from torch import Tensor | |
class LinearSingleTaskGP(SingleTaskGP): | |
def __init__(self, train_X: Tensor, train_Y: Tensor, **kwargs): | |
super().__init__(train_X, train_Y, **kwargs) | |
self.mean_module = LinearMean(batch_shape=train_X.shape[:-2], input_size=train_X.size(-1)) |
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(dplyr) | |
library(broom) | |
library(foreach) | |
library(ggplot2) | |
N <- 1e4 | |
# generates simulated experiment data where we have two experiments, | |
# where E1=1 with probability p0, and E2=0 with probability p1 | |
# interaction is the size of the treatment interaction, expressed in terms |