是否有任何用于 javascript 的统计库?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/5656897/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Is there any statistical library for javascript?
提问by Orhun Alp Oral
I need to implement some statistical tests like: T-test, Anova and Wilcoxon on javascript.
我需要在 javascript 上实现一些统计测试,例如:T-test、Anova 和 Wilcoxon。
Similar to Java's - Apache Commons Math Library, is there any statistical tests library or codes for javascript?
类似于 Java 的 - Apache Commons Math Library,是否有任何用于 javascript 的统计测试库或代码?
回答by Orhun Alp Oral
jStat
: a JavaScript statistical library
jStat
:一个 JavaScript 统计库
回答by user56reinstatemonica8
OpenEpiis a Javascript stats library, is open source, and has ANOVA and t-tests. I've not tried it (it's a bit too focused on epidemiology for my needs) but it might be useful.
OpenEpi是一个 Javascript 统计库,是开源的,具有方差分析和 t 检验。我还没有尝试过(它有点过于关注我的需要的流行病学),但它可能有用。
jStatis a javascript statistical library project, and it looks like it's got a great future, but it might not have all you need right now. Edit:as of Dec 2012 it looks like the jStat project pageis no longer maintained but the projectis continuing to be developed. There's more up to date documentation on github. It now does have anova testsand varietiesof t-test. No sign of Wilcoxon signed-rank though.
jStat是一个 javascript 统计库项目,看起来它有一个美好的未来,但它可能没有你现在需要的一切。编辑:截至 2012 年 12 月,jStat 项目页面似乎不再维护,但该项目仍在继续开发。github 上有更多最新文档。现在确实有ANOVA测试和品种的t检验。虽然没有威尔科克森签名等级的迹象。
If you need very specific statistical processing in javascript urgently, you might have most success by browsing Omegahatwho have various little tools that bridge the established stats language Rwith others including javascript.
如果您迫切需要在 javascript 中进行非常具体的统计处理,您可能会通过浏览Omegahat获得最大的成功,其中有各种小工具可以将既定的统计语言R与其他语言(包括 javascript)连接起来。
It'll depend on the details of exactly what you want to do, but you mighthave some success with packages such as RJavascript- a code translator which aims to help turn existing R features into Javascript (just don't expect quality results first time). Also, SpiderMonkeybuilds on R for browsers, so it might be useful for internal or personal uses (but it's unlikely to be suitable for public publishing).
这将取决于您想要做什么的具体细节,但您可能会使用RJavascript等软件包取得一些成功- 一种旨在帮助将现有 R 功能转换为 Javascript 的代码翻译器(只是不要期望第一次获得高质量的结果)。此外,SpiderMonkey为浏览器构建在 R 之上,因此它可能对内部或个人使用有用(但不太可能适合公开发布)。
回答by btilly
Some years ago I ported https://code.google.com/p/statistics-distributions-js/so that I could use it in http://elem.com/~btilly/effective-ab-testing/- it may have the functionality you need if you only need simple things.
几年前,我移植了https://code.google.com/p/statistics-distributions-js/以便我可以在http://elem.com/~btilly/effective-ab-testing/ 中使用它- 它可能如果您只需要简单的东西,就有您需要的功能。
回答by Dave Romero
If you're looking for a simple library for descriptive statistics, you could use javascriptstats.com
如果您正在寻找一个简单的描述性统计库,您可以使用javascriptstats.com
It does:
它确实:
- Mean
- Median
- Mode
- Range
- Variance
- Standard Deviation
- 意思是
- 中位数
- 模式
- 范围
- 方差
- 标准差
Best!
最好的!
回答by marcrichter
Leveraging a related answer:
利用相关答案:
The following blog post lists some recent packages: http://jgoodall.me/posts/2012/02/01/javascript-statistical-libraries/
以下博客文章列出了一些最近的软件包:http: //jgoodall.me/posts/2012/02/01/javascript-statistical-libraries/
As mentioned by others, native JS is a far cry from R, which web-wise has progressed from RApache (http://rapache.net/) to shiny (http://www.rstudio.com/shiny/). The latter uses node.js server-side, so this is quite promising. Of course both approaches will require you to code stats in R server-side, instead of using JS either on client or server.
正如其他人所提到的,原生 JS 与 R 相去甚远,它在网络方面已经从 RApache(http://rapache.net/)发展到闪亮的(http://www.rstudio.com/shiny/)。后者使用 node.js 服务器端,所以这很有前途。当然,这两种方法都需要您在 R 服务器端编写统计信息,而不是在客户端或服务器上使用 JS。
Marc
马克