-
-
Notifications
You must be signed in to change notification settings - Fork 19
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
Plackett-Luce question #245
Comments
I had the same issue porting to python, but I ended up using for loops instead. Maybe this will give you more insight into what is going on in the code. |
Thanks - I'd actually been using your codebase as well for a reference for my Ruby port already! Poked around a bit more, and I think it doesn't matter, since the teams are sorted by rank coming into the model already, so the filter is only removing teams from the back of the list and the indices are the same in the end. omega_sum, delta_sum = team_ratings
.filter {|_,_,_,q_rank| q_rank <= rank }
.map.with_index
# .filter {|(_,_,_,q_rank),_| q_rank <= rank }
.inject([0, 0]) {|(omega, delta), ((_,_,_,q_rank), q)| |
Hi! You have a keen eye to spot this! Apologies for missing this and thank you @daegontaven for responding so quickly. You may also be interested in the source code in the zip file at https://www.csie.ntu.edu.tw/~cjlin/papers/online_ranking/ which I ran to generate a lot of my test cases, and then I wrote a lot of my code in a functional style, but verified that my outputs were the same. It's not an issue with sumQ because both of them have the filter where I think you've found a problem with |
Opening this issue up to anyone on |
Hello there, I wanted to use this algorithm in Ruby and started porting the code over, but I have a question about your implementation of Plackett-Luce.
openskill.js/src/models/plackett-luce.js
Lines 15 to 26 in 87a3074
There's a
reduce
after afilter
, so wouldn't theq
index be incorrect when indexing intosum_q
andc
, or am I misunderstanding the code here?The text was updated successfully, but these errors were encountered: