gobbios / elorating Goto Github PK
View Code? Open in Web Editor NEWAnimal dominance hierarchies
Animal dominance hierarchies
seq.check() should check that winner, loser and Date do not contain NAs
Hi - I've been using the init = "bottom" argument in elo.seq() to calculate Elo Ratings and it doesn't seem to be working as expected. When I've been using the argument, animals entering the hierarchy are not assigned the lowest ratings - they are assigned the average rating. I've attached a pdf of code output to illustrate this. Any and all assistance would be greatly appreciated!
EloSeq-issue.pdf
creatematrix()
fails if the supplied daterange covers only one day, so the following results in a error:
data(adv)
SEQ <- elo.seq(winner = adv$winner, loser = adv$loser, Date = adv$Date)
creatematrix(SEQ, daterange = c("2010-01-26", "2010-01-26"))
Calculate Elo-ratings from a matrix without transforming into a random sequence.
I do not see any difference between .elo.seq_old and elo.seq, however I cannot change the start value when I use elo.seq. The code I wrote and the output is below.
CODE:
res1 <- EloRating:::.elo.seq_old(
winner = season_1011_dates_elo$winner,
loser = season_1011_dates_elo$loser,
Date = season_1011_dates_elo$Date,
draw = season_1011_dates_elo$Draw,
startvalue = 500,
k = 2,
runcheck = TRUE,
progressbar = FALSE
)
summary(res1)
res_elo <- elo.seq(
winner = season_1011_dates_elo$winner,
loser = season_1011_dates_elo$loser,
Date = season_1011_dates_elo$Date,
draw = season_1011_dates_elo$Draw,
startvalue = 500,
k = 2,
runcheck = TRUE,
progressbar = FALSE
)
summary(res_elo)
SUMMARY OUTPUT:
summary(res1)
Elo ratings from 20 individuals
total (mean/median) number of interactions: 380 (38/38)
range of interactions: 38 - 38
date range: 2010-08-14 - 2011-05-22
startvalue: 500
uppon arrival treatment: average
k: 2
proportion of draws in the data set: 0.29
summary(res_elo)
Elo ratings from 20 individuals
total (mean/median) number of interactions: 380 (38/38)
range of interactions: 38 - 38
date range: 2010-08-14 - 2011-05-22
startvalue: 1000
uppon arrival treatment: average
k: 2
proportion of draws in the data set: 0.29
Also, I also noticed that optimizek does not work with .elo.seq_old.
When I use the elo.seq function from the gitbug version with presence data available I get an error code that says "for ID (VEL, DOV, VIN, OCH, ASH, ECH, OST) the first interaction occurred before first presence".
I checked my data and this is not the case.
tempelo
ELL ALF DOT VEN ORE VOR VIX VIV OMO VEL DOV VIN OCH ASH ECH OST
recelo 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000
present NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
firstIA 1 1 1 1 14 14 14 35 35 288 496 711 1047 1397 1507 1631
firstpres 1 1 1 1 1 1 1 1 1 283 494 691 1041 1388 1481 1631
When I run the elo.seq with the cran version it does work.
when using ISI()
, the returned matrix (or matrices) may have interactions missing. For example,
data("devries98")
res <- ISI(devries98)[[1]]
res[c("k", "c"), c("k", "c")]
k c
k 0 0
c 0 0
versus the original
devries98[c("k", "c"), c("k", "c")]
k c
k 0 2
c 2 0
Sometimes randomsequence()
produces funky results where the presence for some individuals is a mix of 0 and 1, and not 'nice' sequences of 0 and 1. It's a bit hard to reproduce, but happens when group size goes below two individuals due to absence of some individuals.
I got the above error message but when I checked my data all of the IDs were present for the listed interactions.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.