You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hi, I'm interested in your paper that was published in AAAI 17,
and am trying to get the simulation running, but am receiving the following error.
$ python Simulation.py --alg factorUCB
...
File "Simulation.py", line 508, in
algorithms['LinUCB'] = N_LinUCBAlgorithm(dimension = context_dimension, alpha = alpha, lambda_ = lambda_, n = n_users)
TypeError: init() got an unexpected keyword argument 'n'
This occurs because the constructor for the N_LinUCBAlgorithm class doesn't expect an "n" arg, but instead an "init" one which does not seem related to the "n" in question.
class N_LinUCBAlgorithm:
def init(self, dimension, alpha, lambda_, init="zero"): # n is number of users
self.users = {}
Should I just remove " n = n_users' from the call on line 508 in Simulation.py,
as you sometimes call N_LinUCBA without it from within that same file ( see line 495) ?
I'm running things in Python 2.7, and when I removed "n = n_users" from the call above, the code proceeds farther, but then runs into the following error below. Thank you for the assistance.
$ python Simulation.py --alg factorUCB
...
Users 9 CoTheta [ 0.17459147 0.04203424 0.16958883 0.02280975 0.23921426 0.05525657
0.09552645 0.11874966 0.07183244 0.0457676 0.28499082 0.
0.01674014 0.1272744 0.3656073 0.28675806 0.165991 0.07772692
0.17026372 0.07092157]
Traceback (most recent call last):
File "Simulation.py", line 525, in
simExperiment.runAlgorithms(algorithms)
File "Simulation.py", line 302, in runAlgorithms
VDiff[alg_name] += self.getL2Diff(self.articles[pickedArticle.id].featureVector, alg.getV(pickedArticle.id))
File "Simulation.py", line 170, in getL2Diff
return np.linalg.norm(x-y) # L2 norm
ValueError: operands could not be broadcast together with shapes (20,) (25,)
hi, I'm interested in your paper that was published in AAAI 17,
and am trying to get the simulation running, but am receiving the following error.
$ python Simulation.py --alg factorUCB
...
File "Simulation.py", line 508, in
algorithms['LinUCB'] = N_LinUCBAlgorithm(dimension = context_dimension, alpha = alpha, lambda_ = lambda_, n = n_users)
TypeError: init() got an unexpected keyword argument 'n'
This occurs because the constructor for the N_LinUCBAlgorithm class doesn't expect an "n" arg, but instead an "init" one which does not seem related to the "n" in question.
class N_LinUCBAlgorithm:
def init(self, dimension, alpha, lambda_, init="zero"): # n is number of users
self.users = {}
Should I just remove " n = n_users' from the call on line 508 in Simulation.py,
as you sometimes call N_LinUCBA without it from within that same file ( see line 495) ?
algorithms['LinUCB'] = N_LinUCBAlgorithm(dimension = context_dimension, alpha = alpha, lambda_ = lambda_)
Thank you
The text was updated successfully, but these errors were encountered: