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
import lightgbm as lgb | |
import numpy as np | |
import pandas as pd | |
import sklearn.datasets | |
from sklearn.datasets import fetch_openml | |
import sklearn.metrics | |
from sklearn.model_selection import train_test_split | |
import optuna |
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
#!/usr/bin/env python | |
# coding: utf-8 | |
import numpy as np | |
import matplotlib.pyplot as plt | |
# centered case | |
def LHS(n, d): | |
samples = np.tile(np.arange(n, dtype=np.float64), (d, 1)).reshape(d, n) |
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
#!/usr/bin/env python | |
# coding: utf-8 | |
import numpy as np | |
import matplotlib.pyplot as plt | |
# centered case | |
def LHS(n, d): | |
samples = np.tile(np.arange(n, dtype=np.float64), (d, 1)).reshape(d, n) |
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
import numpy | |
import scipy.ndimage | |
import matplotlib.pyplot as plt | |
from sklearn import datasets | |
from sklearn import decomposition | |
digits = datasets.load_digits() | |
images = digits.images | |
images = map(lambda x: scipy.ndimage.zoom(x, 2, order=1), images) |
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
from kurobako import solver | |
from kurobako.solver.optuna import OptunaSolverFactory | |
import optuna | |
from optuna.samplers import QMCSampler | |
def create_study(seed): | |
sampler = QMCSampler(seed=seed, scramble=True, qmc_type="halton", warn_independent_sampling=False) | |
return optuna.create_study(sampler=sampler) |
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
from concurrent.futures import ProcessPoolExecutor, wait | |
import fire | |
from matplotlib import pyplot as plt | |
import numpy as np | |
import optuna | |
import os | |
import time | |
import torch | |
N_WORKERS = 10 |
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
"""Visualization of Brownian bridge construction of a Brownian motion.""" | |
import numpy as np | |
from matplotlib import pyplot as plt | |
T = 1 | |
TAB10_CMAP = plt.get_cmap("tab10") | |
DEFAULT_COLOR = TAB10_CMAP(0) |