Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactoring: add subclasses for linear and logistic policies #91

Merged
merged 3 commits into from
May 2, 2021

Conversation

Kurorororo
Copy link
Contributor

fix #66

@usaito
Copy link
Contributor

usaito commented May 2, 2021

@Kurorororo

Thanks! I think self.reward_lists and self.context_lists have to be initialized in BaseLogisticPolicy

self.reward_lists = [[] for _ in np.arange(self.n_actions)]
self.context_lists = [[] for _ in np.arange(self.n_actions)]

the other parts LGTM!

@Kurorororo
Copy link
Contributor Author

@usaito
They are initialized in BaseContextualPolicy, a superclass of BaseLogisticPolicy.

zr-obp/obp/policy/base.py

Lines 153 to 154 in dac1ec0

self.reward_lists = [[] for _ in np.arange(self.n_actions)]
self.context_lists = [[] for _ in np.arange(self.n_actions)]

@usaito
Copy link
Contributor

usaito commented May 2, 2021

@Kurorororo Got it, thanks!

@usaito usaito merged commit bb9b7fd into st-tech:master May 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

alpha_ and lambda_ are not necessary for contextual linear bandit algorithms
2 participants