AttributeError: 'Dedupe' object has no attribute 'sample'

Viewed 458

I was running the csv_example.py from dedupe-examples.

I got an error message as below

File "csv_example.py", line 111, in <module>
    deduper.sample(data_d, 15000)
AttributeError: 'Dedupe' object has no attribute 'sample'

Any help would be appreciated!

2 Answers

from dedupe import labeler

try labeler.sample(data_d,15000) had same problem,sample is inside labeler file of dedupe, this worked for me

I was facing the same problem while trying to run csv_-example.py. I found out that you need to replace:

deduper.sample(data_d, 15000)

with

deduper._sample(data_d, 15000)

You need to put an underscore and I think it will work as it happens to me.

Related