The third argument for _check_constructor_input method is supposed to the batch_train boolean. The constructors for BayesianTS and BayesianUCB are instead passing a tuple.
AssertionError Traceback (most recent call last)
<ipython-input-117-96a94fb40784> in <module>()
4 nchoices=50
5
----> 6 bayesian_ts=BayesianTS(nchoices)
7
8 bayesian_ucb=BayesianUCB(nchoices)
~\AppData\Local\Continuum\anaconda3\lib\site-packages\contextualbandits\online.py in __init__(self, nchoices, method, beta_prior)
1912 """
1913 def __init__(self, nchoices, method='advi', beta_prior=((1,1),3)):
-> 1914 _check_constructor_input(_BetaPredictor(1,1),nchoices,((1,1),2))
1915 self.beta_prior = beta_prior
1916 self.nchoices = nchoices
~\AppData\Local\Continuum\anaconda3\lib\site-packages\contextualbandits\utils.py in _check_constructor_input(base_algorithm, nchoices, batch_train)
54 assert ('fit' in dir(base_algorithm)) and ('predict' in dir(base_algorithm))
55 if batch_train:
---> 56 assert 'partial_fit' in dir(base_algorithm)
57 return None
58
The third argument for _check_constructor_input method is supposed to the batch_train boolean. The constructors for BayesianTS and BayesianUCB are instead passing a tuple.