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

Score - weird values #3

Closed
QuentinRa opened this issue May 18, 2021 · 1 comment · Fixed by #16
Closed

Score - weird values #3

QuentinRa opened this issue May 18, 2021 · 1 comment · Fixed by #16
Assignees
Milestone

Comments

@QuentinRa
Copy link
Contributor

QuentinRa commented May 18, 2021

The score can take some weird values, such as 8100.0062612 so maybe make a better function.

This sample might help

score <- function (s, g, t, dd, ns, fe, fa){
  score <- s - g
  if (score > 0){
    score <- ifelse(s > 10000 * 2, sqrt(s), s)
    score <- score + score * (1 / log(t))
    score <- score + sqrt(dd / t)
    score <- score + score * (1 / log(ns))
    if( g > 1 ) score <- score - score / log2(g^2)
  }
  if(fe + fa < 10) score <- score / 2
  round(score)
}

score(2322992,1,129,154381563207,400,10,10 )

for (i in sample(1:10000, 50)){
  cat("i=",i, " for ",
    score(10032,i, sample(1:700,1), sample(
      50000:3000000, 1
    ),sample(0:300, 1),350,170 ),
      "\n"
  )
}
@QuentinRa QuentinRa added this to the Version 3.1 milestone May 18, 2021
@QuentinRa QuentinRa self-assigned this May 18, 2021
@QuentinRa QuentinRa changed the title Score Score - weird values May 18, 2021
@DataSaiyentist
Copy link

Score_screen

@QuentinRa QuentinRa linked a pull request May 23, 2021 that will close this issue
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 a pull request may close this issue.

2 participants