Skip to content

NewsRecommendation contex vectors generator #2

@DemirTonchev

Description

@DemirTonchev

It seems that NewsRecommendation generates the same context vector for each arm.
Reading LinUCB(2011 Li et al.) paper I have the impression that the context vector should be different (at least at some extend depending the arms features) for each arm. I am mistaken? Or the the implementation is that just for convenience?

context = []
context_vector = np.random.binomial(1,max(0,1/(self.dim-1)),self.dim)
context_vector[0] = 1
for i in range(self.num_articles):
context.append(context_vector)
self.current_rewards[i] = 1/(1+np.exp(-self.thetas[i].dot(context_vector)))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions