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
from typing import List | |
import numpy as np | |
class LinUCB: | |
def __init__(self, models: List[str], n_features: int, alpha: float): | |
self.models, self.n_models = models, len(models) | |
self.alpha = alpha |
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
from typing import List | |
import numpy as np | |
class UCB1: | |
def __init__(self, models: List[str]): | |
self.models, n_models = models, len(models) | |
self.model_successes = np.zeros((n_models)) |
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
from typing import List | |
import random | |
import numpy as np | |
class EGreedy: | |
def __init__(self, models: List[str], epsilon: float = 0.1): | |
self.models, n_models = models, len(models) |
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
#!/bin/bash | |
# Takes one parameter: a remote git repository URL. | |
# | |
# This is the stuff this script does: | |
# | |
# 1. Clones the repository | |
# 2. Fetches all remote branches | |
# 3. Compresses the folder | |
# 4. Deletes the cloned folder. |