软件简介

基于卡方检验的大数据抽样工具

介绍

抽样是数据科学中的基本方法之一。它可以降低数据规模并简化计算。本工具包给出一种保持分布不变性的抽样工具,使得即使在小样本数据量下也不会影响这些数据分析模型的准确性。本工具包基于皮尔逊检验的保持分布不变的启发式抽样压缩算法。该算法基于两个评分函数进行抽样,其中一个评分函数基于皮尔逊检验,另一个评分函数基于似然函数。

使用方法

大数据抽样压缩工具含两个版本:Matlab版和Python版。

两个版本的功能一致,但Matlab版的运行速度比Python版快。

Matlab版依赖于Matlab v9.7(2019b)运行时环境。若已经安装了Matlab 2019b,则可以在Matlab命令行窗口输入mrcinstaller直接安装。另外,可以从[网址](https://www.mathworks.com/products/compiler/mcr/index.html)中下载Matlab2019b对应的运行环境。

Python版直接运行源码网址下的文件

hsa_python_with_ui/hsa_python_with_ui/hsa_python_with_ui.py

 Matlab版直接运行源码网址下的文件

hsa_matlab_with_ui/hsa_matlab_with_ui/hsa_matlab_with_ui.py

更详细的内容请参考项目中的用户说明书。

界面

Python版本的主界面如下

Matlab版本的主界面如下

参考文献

[1] Yang J, Wang J, Cheng W, et al. Sampling to Maintain Approximate Probability Distribution Under Chi-Square Test[C]//National Conference of Theoretical Computer Science. Springer, Singapore, 2019: 29-45.

[2] Yang J Y, Wang J D, Zhang Y F, et al. A Heuristic Sampling Method for Maintaining the Probability Distribution[J]. Journal of Computer Science and Technology, 2021, 36(4): 896-909.

转载自: https://www.oschina.net/p/big-data-sampling-under-chi-square