Skip to content

Instantly share code, notes, and snippets.

View eytan's full-sized avatar

Eytan Bakshy eytan

View GitHub Profile
# 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))
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
@eytan
eytan / README.md
Created March 28, 2013 07:22 — forked from mbostock/.block

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.