Skip to content
This repository has been archived by the owner on Oct 8, 2024. It is now read-only.

Acc based on Statistical Accuracy #93

Open
tr3sleches opened this issue May 20, 2019 · 0 comments
Open

Acc based on Statistical Accuracy #93

tr3sleches opened this issue May 20, 2019 · 0 comments

Comments

@tr3sleches
Copy link

tr3sleches commented May 20, 2019

I'm going to be off/away for a while, so I wanted to get this out there.
So I wrote up a statistically accurate accuracy pp type thing.
Mad props to Full Tablet for the inspiration.
I discussed this a long time ago (before I knew this discord even existed), but never got around to doing anything about it:
https://osu.ppy.sh/community/forums/topics/727540?start=6741333
(Ignore my ignorance in this post)

precision = 0.01;
p = 1.645; //based on z-score values
double sGuess(acc,OD)
{
     //approximate mean and standard deviation for OD slope
     u1 = -6.635;
     o1 = 1/0.518926;
     // approximate mean and standard deviation OD intercept
     u2 = 88.485;
     o2 = 1/0.0386966;
     return (u1 + erfinv(2*acc – 1)*o1*Math.sqrt(2))*OD +  (u2 - erfinv(2*acc – 1)*o2*Math.sqrt(2));
}
double E(s,MS)
{
     return erf(MS/(Math.sqrt(2)*s));
}
double E300 = E(s,79.5-6*OD); 
double E100 = E(s,139.5-8*OD); 
double E50 = E(s,199.5-10*OD);
double mean(s,OD)
{
     return (2/3)*E300(s,OD) + (1/6)*E100(s,OD) +(1/6)*E50(s,OD);
}
double Ex2(s,OD)
{
     return (8/9)*E300(s,OD) + (1/12)*E100(s,OD) +(1/36)*E50(s,OD);
}
double sd(s,OD)
{
     return Math.sqrt(Ex2(s,OD) – Math.pow(mean(s,OD),2));
}
double f(acc,num_circles,s,OD)
{
     return acc - mean(s,OD) – Math.sqrt(2/num_circles) * p * sd(s,OD);
}

double bijectionS(acc,num_circles,OD)
{
//initial guesses
double s0;
double s1;
s0 = sGuess(acc,OD);
s1 = sGuess(acc – Math.sqrt(2/(num_circles-1))*p,OD);
//approximation

while(abs(s1-s0) > precision)
{
     if(f(acc,num_circles,(s0+s1)/2,OD)* f(acc,num_circles,s0,OD) > 0)
     {
          s0 = (s0+s1)/2;
     }
     else if(f(acc,num_circles,(s0+s1)/2,OD)* f(acc,num_circles,s1,OD) > 0)
     {
          s1 = (s0+s1)/2;
     }
}
return 0.5 * (s0 + s1);
}

The hard part is finding the function for the acc pp in terms of s.
Ideally we could just directly convert the OD part and be done with it.
2.83*1.52163^OD => a*1.52163^(13.25-s/6) for some constant a.
Although warranted, this could lead to some big changes for decent accuracies.
I don't know how the error function and error inverse function are established in osu, so I just labeled them as erf and erfinv respectively.
I shorthanded some stuff here for clarity, but for actual coding some stuff will have to change, e.g. E300, E100, & E50 might have to be defined like E is instead of shorthanded like it is. I have to fix the inputs of the functions (putting their data type before and such, but that can easily be done later).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant