-
Notifications
You must be signed in to change notification settings - Fork 30.6k
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
Porting compare.R
to JavaScript?
#16762
Comments
#12585 has some discussion on doing the stats tests in JS/Python. |
The main benefit of R is the I asked an R ninja to do this porting, but he lost interest. |
Should we mark this as good-first-issue? One don't really need to know too much about core to do this but if they are a stats ninja they might be interested. |
@Trott Thanks for the ping. In stdlib, we have implemented T-test functionality, which seems to be the main feature of the While not available at the moment to use out-of-the-box, the code should provide some insight into what would be required to "roll your own" implementation. Most importantly, a proper T-test implementation won't rely on a T-table. Instead, it will rely on computing the CDF of a Students t-distribution, which can be found here. And computing the CDF, requires computing the incomplete beta function, which is not straightforward. So, my assessment is that this is not a good first issue. You would need to put in considerable time to actually implement something comparable to R/Python, as we have. As a stop gap, if you are wanting to rid yourselves of the R dependency, then use SciPy. The talk about using Pandas in the PR thread mentioned above is misguided. The SciPy functionality should work for Python 2.7 and above. You can achieve the box plot functionality using Matplotlib. Once we have decomposed stdlib into individual packages, you'll be able to do everything in JS. But until then, I would opt for Python. |
@kgryte thank you so more for the input.
Getting 💡 But just to put things in perspective, we are not looking for scientific paper grade statistics, we just need a way to measure significance, so IMHO having a precalculated T-table as a rough approximation of the CDF of a Student's t-distribution seems good enough from my POV. |
As a slight addendum to @kgryte's post, I would just like to note that the reason we haven't published to As of now, our recommended approach to use |
Any chance the benefits of having
benchmark/compare.R
functionality in JavaScript would outweigh any downsides?No opinion from me on it. Just pondering. I know R and Python tend to be the languages of choice for this sort of thing but maybe there's something to be said for a stdlib-js approach to it? /cc @kgryte
(For that matter, would a Python 2 port make sense? At least we'd have one less external tool we rely on, as we need Python 2 for our build tool chain.)
The text was updated successfully, but these errors were encountered: