This file contains hidden or 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
import botorch | |
import gpytorch | |
import matplotlib.pyplot as plt | |
import torch | |
from botorch.acquisition.monte_carlo import qExpectedImprovement | |
from botorch.fit import fit_gpytorch_model | |
from botorch.models import ModelListGP, SingleTaskGP | |
from botorch.models.gpytorch import GPyTorchModel | |
from functools import partial | |
from gpytorch.mlls.exact_marginal_log_likelihood import ExactMarginalLogLikelihood |
This file contains hidden or 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
import mlflow | |
import numpy as np | |
import matplotlib.pyplot as plt | |
# get runs | |
exp_name = "experiment_name" | |
exp_id = mlflow.get_experiment_by_name(exp_name).experiment_id | |
runs = mlflow.search_runs(exp_id) |
This file contains hidden or 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
import scipy.stats | |
def clopper_pearson(k,n,alpha=0.32): | |
""" | |
http://en.wikipedia.org/wiki/Binomial_proportion_confidence_interval | |
alpha confidence intervals for a binomial distribution of k expected successes on n trials | |
Clopper Pearson intervals are a conservative estimate. | |
""" | |
lo = scipy.stats.beta.ppf(alpha/2, k, n-k+1) | |
hi = scipy.stats.beta.ppf(1 - alpha/2, k+1, n-k) | |
return lo, hi |