NoiseScale=NoiseScale, poolArticleSize=poolArticleSize) ## Initiate Bandit Algorithms ## algorithms = {} # algorithms['EpsilonGreedyMultiArmedBandit'] = EpsilonGreedyMultiArmedBandit(num_arm=n_articles, epsilon=None) # ## my implementation # algorithms['UppperConfidenceBound'] = UpperConfidenceBound(num_arm=n_articles, c=0.01) # algorithms['ThompsonSampling'] = ThompsonSampling(num_arm=n_articles, c=0.001) # algorithms['PHE'] = PHE(num_arm=n_articles, c=0, a = 0.001, p = 0.5) algorithms['EpsilonGreedyLinearBandit'] = EpsilonGreedyLinearBandit( dimension=context_dimension, lambda_=0.1, epsilon=None) ## algorithms['LinUCB'] = LinUCB(dimension=context_dimension, lambda_=0.1, c=0.1) algorithms['LinTS'] = LinTS(dimension=context_dimension, lambda_=0.01, c=0.00001) algorithms['LinPHE'] = LinPHE(dimension=context_dimension, lambda_=0.1, c=0, a=0.01, p=0.5) ## Run Simulation ## print("Starting for ", simExperiment.simulation_signature) simExperiment.runAlgorithms(algorithms)
poolArticleSize=config["poolSize"], NoiseScale=config["NoiseScale"], Plot=Plot, Write_to_File=Write_to_File) print("Starting for ", simExperiment.simulation_signature) algorithms = {} algorithms['oracleLinUCB'] = oracleLinUCB( dimension=config["context_dimension"], alpha=config["alpha"], lambda_=config["lambda_"], NoiseScale=config["NoiseScale"], delta_1=config["delta_1"]) algorithms['LinUCB'] = LinUCB(dimension=config["context_dimension"], alpha=config["alpha"], lambda_=config["lambda_"], NoiseScale=config["NoiseScale"]) algorithms['adTS'] = AdaptiveThompson( dimension=config["context_dimension"], AdTS_Window=config["AdTS_Window"], AdTS_CheckInter=50, v=config["v"]) algorithms['dLinUCB'] = dLinUCB(dimension=config["context_dimension"], alpha=config["dLinUCB_alpha"], lambda_=config["lambda_"], NoiseScale=config["NoiseScale"], tau=config["tau"], delta_1=config["delta_1"], delta_2=config["delta_2"], tilde_delta_1=config["tilde_delta_1"]) algorithms['CLUB'] = CLUBAlgorithm(dimension=config["context_dimension"],
## Initiate Bandit Algorithms ## algorithms = {} # algorithms['EpsilonGreedyMultiArmedBandit'] = EpsilonGreedyMultiArmedBandit(num_arm=n_articles, epsilon=None) # algorithms['UCB'] = UCB(num_arm=n_articles, NoiseScale=NoiseScale) # algorithms['TS'] = TS(num_arm=n_articles, NoiseScale=NoiseScale) # algorithms['PHE'] = PHE(num_arm=n_articles, perturbationScale=0.1) lambda_ = 0.1 delta = 1e-1 algorithms['EpsilonGreedyLinearBandit'] = EpsilonGreedyLinearBandit( dimension=context_dimension, lambda_=lambda_, epsilon=None) algorithms['LinUCB'] = LinUCB(dimension=context_dimension, alpha=-1, lambda_=lambda_, delta_=delta, NoiseScale=NoiseScale) algorithms['LinTS'] = LinTS(dimension=context_dimension, NoiseScale=NoiseScale, lambda_=lambda_) algorithms['LinPHE'] = LinPHE(dimension=context_dimension, lambda_=lambda_, perturbationScale=1) algorithms['NeuralPHE'] = NeuralPHE(dimension=context_dimension, lambda_=lambda_, perturbationScale=1) ## Run Simulation ## print("Starting for ", simExperiment.simulation_signature) simExperiment.runAlgorithms(algorithms)
articles=articles, users=users, noise=lambda: np.random.normal(scale=NoiseScale), batchSize=batchSize, type_="UniformTheta", signature=AM.signature, poolArticleSize=poolSize, NoiseScale=NoiseScale, Write_to_File=False) print "Starting for ", simExperiment.simulation_signature algorithms = {} if not args.alg: algorithms['LinUCB'] = LinUCB(dimension=context_dimension, alpha=alpha, lambda_=lambda_, NoiseScale=NoiseScale) #algorithms['adTS'] = AdaptiveThompson(dimension = context_dimension, AdTS_Window = 200, AdTS_CheckInter = 50, sample_num = 1000, v = 0.1) algorithms['dLinUCB'] = dLinUCB(dimension=context_dimension, alpha=alpha, lambda_=lambda_, NoiseScale=NoiseScale, tau=tau) elif algName == 'LinUCB': algorithms['LinUCB'] = LinUCB(dimension=context_dimension, alpha=alpha, lambda_=lambda_, NoiseScale=NoiseScale) #elif algName == 'adTS': #algorithms['adTS'] = AdaptiveThompson(dimension = context_dimension, AdTS_Window = 200, AdTS_CheckInter = 50, sample_num = 1000, v = 0.1)