Re-fit Entity Matching Model
- async AsyncCogniteClient.entity_matching.refit(
- true_matches: Sequence[dict | tuple[int | str, int | str]],
- id: int | None = None,
- external_id: str | None = None,
Re-fits an entity matching model, using the combination of the old and new true matches.
Note
All users on this CDF subscription with assets read-all and entitymatching read-all and write-all capabilities in the project, are able to access the data sent to this endpoint.
- Parameters:
true_matches (Sequence[dict | tuple[int | str, int | str]]) – Updated known valid matches given as a list of dicts with keys ‘fromId’, ‘fromExternalId’, ‘toId’, ‘toExternalId’). A tuple can be used instead of the dictionary for convenience, interpreted as id/externalId based on type.
id (int | None) – id of the model to use.
external_id (str | None) – external id of the model to use.
- Returns:
new model refitted to true_matches.
- Return type:
Examples
>>> from cognite.client import CogniteClient, AsyncCogniteClient >>> client = CogniteClient() >>> # async_client = AsyncCogniteClient() # another option >>> sources = [ ... {"id": 101, "name": "ChildAsset1", "description": "Child of ParentAsset1"} ... ] >>> targets = [{"id": 1, "name": "ParentAsset1", "description": "Parent to ChildAsset1"}] >>> true_matches = [(1, 101)] >>> model = client.entity_matching.refit(true_matches=true_matches, id=1)