监视pandas或spark数据集的稳定性

popmon的Python项目详细描述


Build statusPackage docs statusLatest GitHub releaseGitHub Release DatePyPi downloads

POPMON logo

popmon是一个允许检查数据集稳定性的包。 popmon可以同时使用pandasspark数据集。在

popmon创建时间切片中的特征直方图, 并对其剖面和分布的稳定性进行了比较 这些柱状图使用统计检验,随着时间的推移和参照物。 它可以处理数字、顺序和范畴特征,并且直方图可以是更高维的,例如,它还可以跟踪任意两个特征之间的相关性。 popmon可以自动标记并在观察到的变化时发出警报,例如 作为趋势、变化、峰值、异常值、异常、变化的相关性等, 使用监控业务规则。在

Traffic Light Overview

文件

完整的popmon文档(包括教程)可以在read-the-docs找到。在

看看吧

popmon库需要python3.6+,并且是pip友好的。要开始,只需执行以下操作:

$ pip install popmon

或者从我们的GitHub存储库中查看代码:

^{pr2}$

在本例中,代码以编辑模式安装(选项-e)。在

现在,您可以使用Python中的包:

importpopmon

恭喜你,你现在可以使用popmon库了!

快跑

举个简单的例子,您可以:

importpandasaspdimportpopmonfrompopmonimportresources# open synthetic datadf=pd.read_csv(resources.data('test.csv.gz'),parse_dates=['date'])df.head()# generate stability report using automatic binning of all encountered features# (importing popmon automatically adds this functionality to a dataframe)report=df.pm_stability_report(time_axis='date',features=['date:age','date:gender'])# to show the output of the report in a Jupyter notebook you can simply run:report# or save the report to filereport.to_file("monitoring_report.html")

要指定自己要报告的binning规范和功能,请执行以下操作:

# time-axis specifications alone; all other features are auto-binned.report=df.pm_stability_report(time_axis='date',time_width='1w',time_offset='2020-1-6')# histogram selections. Here 'date' is the first axis of each histogram.features=['date:isActive','date:age','date:eyeColor','date:gender','date:latitude','date:longitude','date:isActive:age']# Specify your own binning specifications for individual features or combinations thereof.# This bin specification uses open-ended ("sparse") histograms; unspecified features get# auto-binned. The time-axis binning, when specified here, needs to be in nanoseconds.bin_specs={'longitude':{'bin_width':5.0,'bin_offset':0.0},'latitude':{'bin_width':5.0,'bin_offset':0.0},'age':{'bin_width':10.0,'bin_offset':0.0},'date':{'bin_width':pd.Timedelta('4w').value,'bin_offset':pd.Timestamp('2015-1-1').value}}# generate stability reportreport=df.pm_stability_report(features=features,bin_specs=bin_specs,time_axis=True)

这些示例也适用于spark数据帧。 您可以看到这样的示例笔记本代码here的输出。 有关所有可用的示例,请参见tutorialsat read the docs。在

资源

演示文稿

^{tb2}$

文章

^{3}$

项目贡献者

这个包是由ING批发银行高级分析编写的。 特别感谢为这个包的开发做出贡献的以下人员:Ahmet ErdemFabian JansenNanne Aben,Mathieu Grimal。在

联系和支持

请注意,ING WBAA仅在尽力的基础上提供支持。在

许可证

版权所有ING WBAA。popmon是完全免费的、开源的,并在MIT license下获得许可。在

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java为什么程序显示空结果?   java应用程序在测试设备上调试时工作正常,但在发布版apk中没有,它没有获得post。来自firebase的类变量   java Android:从主活动按钮确定在listview中选中哪个复选框   在Spring中添加@OneToOne注释时启动ApplicationContext时发生java错误   用JAVA Android实现矩阵计算的最快方法   SpringJava语义有没有更好的编写方法?   java从hashmap中减去两个值后返回最小差值的键?   Java中的静态初始化顺序:Netty 4.0.7的例外   java如何检查用户输入是否为字符串   循环Java计数单词索引   java如何使用以下代码将视频流传输到Android异步Http服务器?   java如何在jtable的所有行中循环   java如何使用maven将unicode插入mysql   java使用安卓加速远程数据检索   java试图模拟麦克风(javax.sound.sampled)   swing SwingWorker从不归还任何东西?(爪哇)   首次在Android Studio上未加载java LibGDX文件   java如何在多个Mysql服务器上设置限制和偏移?   如何防止从java连接到mongodb时登录控制台?