图算法选择

发布于 2025-02-13 04:12:42 字数 160 浏览 1 评论 0原文

我有一个图形,上面有三种类型的节点(供应商,合同,买方),以及以下关系

(合同与供应商之间) Hasbuyer(合同和买方之间)

在欺诈检测的背景下, ,我想检测图表中的异常情况(对于始终与同一供应商相关的典型买家)。 我应该使用哪种图算法, PS I M与Neo4J合作

I have a graph with three types of nodes (supplier ,contract ,buyer)with the following relations

HasSupplier ( between contract and supplier)
HasBuyer(between contract and buyer)

In the context of a fraud detection ,I want to detect anomalies in my graph (for exemple buyers always associated with the same suppliers).
Which graph algorithm should I use ,
PS I m working with neo4j

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

任性一次 2025-02-20 04:12:42

就您的示例而言,不需要图形算法。

将您的数据读取到数据库中,并使用几个查询,例如:

假设合同可能只有一个买家和一个供应商。

您的数据库需要3个表

**Buyer tabl**e
buyer_index
...

**Supplier table**
supplier_index
...

**Contract table**
Buyer_index
Supplier_index
...

才能检查可疑买家总是使用同一供应商

LOOP over buyers
  count_buyer_contracts = SELECT count FROM contract WHERE buyer_index = buyer
  most_freq_supplier_count = 0
  LOOP over suppliers
     supplier_count = SELECT count FROM contract 
                   WHERE buyer_index = buyer
                   AND supplier_index = supplier
     IF supplier_count > most_freq_supplier_count
         most_freq_supplier_count = supplier_count
  IF most_freq_supplier_count / count_buyer_contracts > suspicion_level
      PRINT buyer is suspicious

For your example a graph algorithm is not needed.

Read your data into a database and use a couple of queries, like this:

Assume that a contract may have only one buyer and one supplier.

Your database needs 3 tables

**Buyer tabl**e
buyer_index
...

**Supplier table**
supplier_index
...

**Contract table**
Buyer_index
Supplier_index
...

To check for suspicious buyer always using same supplier

LOOP over buyers
  count_buyer_contracts = SELECT count FROM contract WHERE buyer_index = buyer
  most_freq_supplier_count = 0
  LOOP over suppliers
     supplier_count = SELECT count FROM contract 
                   WHERE buyer_index = buyer
                   AND supplier_index = supplier
     IF supplier_count > most_freq_supplier_count
         most_freq_supplier_count = supplier_count
  IF most_freq_supplier_count / count_buyer_contracts > suspicion_level
      PRINT buyer is suspicious
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文