My goal is match each of the invoices created to each payment made. So for example, if I have a set of invoices:

InvoiceDate InvoiceCategory
02/21/2016  Amazon 
08/17/2016  BestBuy
08/17/2016  Amazon
08/21/2016  BestBuy

Let's say each of those rows are matched respectively with each row here:

PaymentDate PaymentCategory
04/1/2016     Paypal
9/19/2016     Credit
9/22/2016     Paypal
9/29/2016     Check

That is, 02/21/2016 Amazon matches with 04/1/2016 Paypal and so on.

I want to then train some model on this training set. I want the model to figure out from the example above that the PaymentDate comes roughly a month after each InvoiceDate. And that BestBuy matches more closely to Check than Paypal (because intuitively, Best Buy accepts check payment but not Paypal)

So if my test set consists of

InvoiceDate InvoiceCategory           PaymentDate PaymentCategory
02/21/2015  Amazon                      9/19/2015     Credit
08/17/2015  BestBuy                     04/1/2015     Paypal

Then the ML should predict that 02/21/2015 Amazon matches with 04/1/2015 Paypal and 08/17/2015 BestBuy matches with 9/19/2015 Credit

I've heard about recordlinkage in Python. However, it seems to only link records with identical values. That won't work in my case because in the example above 02/21/2015 matches with 04/1/2015 even though their dates are different

But what ML model matches records like this?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.