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

Two questions #4

Closed
greeness opened this issue Mar 7, 2022 · 4 comments
Closed

Two questions #4

greeness opened this issue Mar 7, 2022 · 4 comments

Comments

@greeness
Copy link

greeness commented Mar 7, 2022

Hi, thanks for sharing the code.

Q1: IIUC, at
https://github.com/CGCL-codes/HCB-pHCB/blob/main/algs/hcb.py#L80, we will never initialize a base_linucb for depth (L-1), which contains the leaf nodes (because we already quit the while loop at line 75 when it is a leaf).

On the other hand, we did not add the root into the path. So when we update the parameters at
https://github.com/CGCL-codes/HCB-pHCB/blob/main/algs/hcb.py#L104, we actually update the parameters for depth 0 to L-2. Is this expected?

Q2: in pHCB, at line
https://github.com/CGCL-codes/HCB-pHCB/blob/main/algs/phcb.py#L95, the reward is multiplied by the depth, I did not see this in the paper, is this intended?

Thanks!

@yusonghust
Copy link
Collaborator

Thanks for your question!
Q1: Yes, it's expected, because another bandit algorithm will select the item at

item = alg.users[user.uid].linucb.decide(user.uid,arms)

Q2: Yes. I am in charge of doing the experiment, and a co-author is in charge of writing the paper, so we may have missed some details. Thank you for pointing out such an issue, we will modify it in a new version.

@greeness
Copy link
Author

greeness commented Mar 7, 2022

Thanks for the quick response. Sounds good on Q2.

Regarding Q1, I thought at level L-1, a level-specific base_linucb is still beneficial because this decides which leaf node to choose. If I understand correctly, the linucb at

self.linucb = NaiveLinUCB(cfg.linucb_para)
is used to choose the item after the leaf node is chosen.

Any comment? Thanks!

@yusonghust
Copy link
Collaborator

Yes, your understanding is correct! I'm sorry for the less rigorous description in the paper. Actually, if the hierarchy tree structure is set to {1, 100, 10000}, which means there are 1, 100, 10000 non-leaf nodes at each level from top to bottom, and the leaf nodes are mounted to a non-leaf node, which is not considered as a certain level.

@greeness
Copy link
Author

greeness commented Mar 7, 2022

Thanks for the clarification.

@greeness greeness closed this as completed Mar 7, 2022
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

No branches or pull requests

2 participants