sql server 关联_SQL Server中的关联规则挖掘

sql server 关联

Association Rule Mining in SQL Server is the next article in our data mining article series in which we have discussed Naïve Bayes, Decision Trees, and Time Series until now. Association Rule Mining, also known as Market Basket Analysis, mainly because Association Mining is used to find out the items which are bought together by the customers during their shopping.

SQL Server中的关联规则挖掘是数据挖掘文章系列中的下一篇文章,到目前为止,我们已经讨论了朴素贝叶斯,决策树和时间序列。 关联规则挖掘,也称为市场篮分析,主要是因为关联挖掘用于找出客户在购物期间一起购买的商品。

The most popular Association Rule Mining example that you will find is the story at the supermarket chain in the US. It is said that they have found out that the customers that are buying beer will buy nappies for their kids. After this finding, management has taken a decision to move the beer palette close to the nappy palette. By doing so, of course, they were able to increase sales. In addition to the money, they were able to make their customers happy. Also, customers buying time was reduced and so the congestion in the supermarket. This means that the Association Rule Mining is helpful to users in many ways.

您会发现的最受欢迎的协会规则挖掘示例是美国超市连锁店的故事。 据说他们发现购买啤酒的顾客会为他们的孩子买尿布。 在发现之后,管理层已决定将啤酒板移至靠近尿布板的位置。 通过这样做,他们当然能够增加销售量。 除了金钱,他们还能够使客户满意。 此外,顾客的购买时间减少了,因此超市的交通拥堵。 这意味着关联规则挖掘在许多方面对用户有帮助。

Though Association Mining is always discussed with shopping, there are other possible areas of applications such as troubleshooting, medicine, and marketing, etc. In troubleshooting, by using Association Rule, you can diagnose what issues occur together. Also, in the domain of medicine, Association Rule will help to find out what types of the disease occur together. This means there are a lot of ways of utilizing the Association Rule in business.

尽管总是与购物讨论“联合挖掘”,但是还有其他可能的应用领域,例如故障排除,药品和市场营销等。在故障排除中,通过使用“联合规则”,您可以诊断出一起发生了什么问题。 同样,在医学领域,关联规则将有助于找出哪些疾病会同时发生。 这意味着有很多方法可以在业务中利用关联规则。

如何在SQL Server中使用关联规则挖掘 (How to Use Association Rule Mining in SQL Server)

This time, there is a small change to the SSAS data mining project to what we have done before. This is due to the fact that we will be using a couple of views in the AdventureWorksDW database, whereas we were using only one view in all previous examples. Those two views are vAssocSeqOrders and vAssocSeqLineItems. vAssocSeqOrders view has orders while the vAssocSeqLineItems view has order lines for the orders. Following screenshot shows sample data set in those two views:

这次,SSAS数据挖掘项目与我们之前所做的相比有很小的变化。 这是由于以下事实:我们将在AdventureWorksDW数据库中使用几个视图,而在前面的所有示例中我们仅使用一个视图。 这两个视图是vAssocSeqOrdersvAssocSeqLineItemsvAssocSeqOrders视图具有订单,而vAssocSeqLineItems视图具有订单的订单行。 以下屏幕截图显示了在这两个视图中的示例数据集:

Sample data set in vAssocSeqOrders and vAssocSeqLineItems views.

If you carefully look at the above screenshot, for the order number SO61313, there are three order lines in the second view.

如果您仔细查看上面的屏幕截图,则订单号为SO61313 第二个视图中有3条订单行。

Let us open SQL Server Data Tools (SSDT) and create an SSAS project to set up the Association Rule Mining. Then create a data source pointing to the AdventureworksDW database as we did in the previous articles.

让我们打开SQL Server数据工具(SSDT)并创建一个SSAS项目以设置关联规则挖掘。 然后,像前面的文章中一样,创建一个指向AdventureworksDW数据库的数据源。

For the data source view, let us add the specified views as shown in the below screenshot:

对于数据源视图,让我们添加指定的视图,如下面的屏幕快照所示:

  • 0
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值