Linkers¶
Model methodologies that link two RecordSteps.
matchlab.models.linkers.base
¶
Base class for linkers.
Classes:
-
Linker–A methodology that finds candidate matches between two record steps.
Linker
¶
Bases: BaseModel, ABC
flowchart TD
matchlab.models.linkers.base.Linker[Linker]
click matchlab.models.linkers.base.Linker href "" "matchlab.models.linkers.base.Linker"
A methodology that finds candidate matches between two record steps.
A Model step calls prepare() once, then link(), each time it collects. Put
one-off setup in prepare() instead, for example fitting a model over both
datasets, so it doesn't repeat on every call to link(). link() must return a
table with left_id, right_id, and score columns. normalise_model_scores
casts that table to SCHEMA_MODEL_EDGES.
Every field is a setting unless marked matchlab.resources.FromResources. A
fingerprint ignores a resource, so a marked field must not change what this scores.
Methods:
-
prepare–Run once before
link(), for setup that shouldn't repeat per call. -
link–Score candidate matches between
leftandright.
Attributes:
model_config
class-attribute
instance-attribute
¶
left_id
class-attribute
instance-attribute
¶
left_id: Literal['id'] = Field(default='id', description='The unique ID field in the left data')
right_id
class-attribute
instance-attribute
¶
right_id: Literal['id'] = Field(default='id', description='The unique ID field in the right data')
prepare
abstractmethod
¶
Run once before link(), for setup that shouldn't repeat per call.
link
abstractmethod
¶
Score candidate matches between left and right.