I'm trying to build a classifier that can determine if two addresses are a match or non-match.

Let's assume I have a data set of address pairs that have a match or non-match label.

I'm new to ML so something may be going over my head but is this how I'm thinking of approaching the task:

Approach for building classifier

  • Segment each address into it's subcomponents such as streetname, zipcode etc
  • Construct a comparison vector with one dimension for each field. The fields holds the value from a string similarity method such as jaro-winkler.
  • All my comparison vectors with an associated match label can now be fed into training a classifier

Predicting if a pair is a match

  • Build a list of candidate address pairs by using a method such as blocking
  • Construct a comparison vector the same way as the classifier was built above
  • The comparison vector for each candidate is now fed into the classifier and this will resolve to either a match or a non-match

My approach was inspired by research paper Machine learning innovations in address matching: A practical comparison of word2vec and CRFs but a lot of the things are vaguely described for a beginner.

To sum up I'm looking for any input on whether this approach holds up or I'm misunderstanding something completely


1 Answer 1


Generally your approach looks good to me. Here are a few comments/suggestions:

  • You didn't mention how the set of labelled pairs is obtained. This part can be tricky when doing record linkage among a large set of N addresses, since it's very difficult to manually annotate all the N*N pairs. Bootstrapping is a common approach afaik.
  • The way the data is obtained may also have consequences about the proportion of positive/negative cases. In general the proportion positive cases is very low, and this can cause the usual problems of class imbalance. It's important not to train the model with a positive/negative ratio completely different from the one in the test set/in production.
  • It's often useful to diversify the similarity measure: instead of using only Jaro-Winkler, you can think of cosine-TFIDF, Levenshtein edit distance, and a lot of variants. In the same logic it's useful to vary the levels of comparison, e.g. characters, characters bigrams/trigrams, words.
  • $\begingroup$ Thanks for your suggestions, those are definitely valueable. I'm having second doubts about understanding the "blocking" part. When is the blocking performed? Is this pre-training, when finding candidate pairs for prediction or both? $\endgroup$
    – J.Kirk.
    May 11, 2020 at 9:07
  • $\begingroup$ @J.Kirk. blocking is meant to minimize the number of comparisons for efficiency reasons, the idea is to avoid comparing pairs which have no chance to match. So it's indeed about finding candidates, and it's useful mostly when having a lot of instances to compare "in production", i.e. on a test set. But it's important to make sure that the test set and the training set contain the same kind of data, so from this point of view it can make sense to apply blocking as a pre-processing step in both stages, depending on your design. $\endgroup$
    – Erwan
    May 11, 2020 at 11:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.