HoloClean / holoclean

A Machine Learning System for Data Enrichment.
http://www.holoclean.io
Apache License 2.0
514 stars 129 forks source link

Memoize get_corr_attributes and a few style changes. #51

Closed richardwu closed 5 years ago

richardwu commented 5 years ago

Memoizing get_corr_attributes reduces runtime by about ~20%.

Before:

   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
        1    0.000    0.000  518.609  518.609 holoclean_repair_example.py:1(<module>)
    97684    1.449    0.000   84.456    0.001 domain.py:150(get_corr_attributes)

After:

   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
        1    0.000    0.000  446.478  446.478 holoclean_repair_example.py:1(<module>)
    97684    0.035    0.000    0.037    0.000 domain.py:151(get_corr_attributes)