【问题标题】:Use python Dedupe package to check for single record使用 python Dedupe 包检查单个记录
【发布时间】:2020-10-01 08:13:42
【问题描述】:

我正在使用 Dedupe python 包检查传入记录的重复项。我已经训练了大约。来自 CSV 文件的 500000 条记录。使用 Dedupe 包,我将 500000 条记录聚集到不同的集群中。我尝试使用退出训练的settings_file 对新记录进行重复数据删除(代码中的data)。我在下面分享了一个代码sn-p。

import dedupe
from unidecode import unidecode
import os

deduper=None
if os.path.exists(settings_file):
    with open(settings_file, 'rb') as sf :
        deduper = dedupe.StaticDedupe(sf)

clustered_dupes = deduper.match(data, 0)

数据,这是一条新记录,我必须检查它是否有重复。 data 看起来像

{1:{'SequenceID': 6855406, 'ApplicationID': 7065902, 'CustomerID': 6153222, 'Name': 'X', 'col1': '-42332423', 'col2': '0', 'col3': '0', 'col4': '0', 'col5': '24G0859681', 'col6': '0', 'col7': 'xyz12345', 'col8': 'xyz', 'col9': '1234', 'col10': 'xyz10'}}

这会引发错误。

没有记录一起被阻止。您尝试匹配的数据是否与您训练的数据相似?

如何使用此集群数据检查新记录是否重复?是否可以像我们对任何 ML 模型所做的那样?我查看了多个来源,但没有找到解决此问题的方法。

大多数消息来源都在谈论训练,而不是关于我如何使用集群数据来检查单个记录。

还有其他出路吗。

我提到的一些链接:link1link2link3

感谢任何帮助。

【问题讨论】:

  • 我已经编辑了这个问题。请重新打开它。

标签: python machine-learning training-data python-dedupe


【解决方案1】:

您需要将最初训练的数据与新记录一起作为输入传递到基于预训练设置的集群

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-09-14
    • 2019-11-27
    • 1970-01-01
    • 2014-05-02
    相关资源
    最近更新 更多