> For the complete documentation index, see [llms.txt](https://docs.zingg.ai/0.3.3/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.zingg.ai/0.3.3/zmodels.md).

# Zingg Models

Zingg learns 2 models on the data.

## 1. Blocking Model

One fundamental problem with scaling data mastering is that the number of comparisons increase quadratically as the number of input record increases.

![Data Mastering At Scale](https://4036728382-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1ZRr4ik7PJ2qmCP10In9%2Fuploads%2Fgit-blob-d84ed8fee8655cece1f5f5e1d7aa6b81e6d7715f%2Ffuzzymatchingcomparisons.jpg?alt=media)

Zingg learns a clustering/blocking model which indexes near similar records. This means that Zingg does not compare every record with every other record. Typical Zingg comparisons are 0.05-1% of the possible problem space.

## 2. Similarity Model

The similarity model helps Zingg to predict which record pairs match. Similarity is run only on records within the same block/cluster to scale the problem to larger datasets. The similarity model is a classifier which predicts similarity of records which are not exactly same, but could belong together.

![Fuzzy matching comparisons](https://4036728382-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1ZRr4ik7PJ2qmCP10In9%2Fuploads%2Fgit-blob-9c6606491acd13c97cc5c9560919ddebe50c23ba%2FdataMatching.jpg?alt=media)

To build these models, training data is needed. Zingg comes with an interactive learner to rapidly build training sets.

![Shows records and asks user to mark yes, no, cant say on the cli.](https://4036728382-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1ZRr4ik7PJ2qmCP10In9%2Fuploads%2Fgit-blob-ba27eaba44c1dd5ff8d1760b87107346292ae65d%2Flabel2.gif?alt=media)
