clarify and more examples
@@ -971,8 +971,8 @@ class Linker:
"""Given one or more records, find records in the input dataset(s) which match
and return in order of the splink prediction score.
- i.e. this effectively provides a way of searching the input datasets
- for a given record
+ This effectively provides a way of searching the input datasets
+ for given record(s)
Args:
records (List[dict]): Input search record(s).
@@ -1047,7 +1047,8 @@ class Linker:
return predictions
def compare_two_records(self, record_1: dict, record_2: dict):
- """Use the linkage model to compare and score two records
+ """Use the linkage model to compare and score a pairwise record comparison
+ based on the two input records provided
Args:
record_1 (dict): dictionary representing the first record. Columns names
@@ -1055,6 +1056,11 @@ class Linker:
record_2 (dict): dictionary representing the second record. Columns names
and data types must be the same as the columns in the settings object
+ Examples:
+ >>> linker = DuckDBLinker(df)
+ >>> linker.load_settings_from_json("saved_settings.json")
+ >>> linker.compare_two_records(record_left, record_right)
+
Returns:
SplinkDataFrame: Pairwise comparison with scored prediction
"""
@@ -1103,12 +1109,12 @@ class Linker:
return predictions
def _self_link(self) -> SplinkDataFrame:
- """Use the linkage model to compare and score all records in our input df,
- with themselves.
+ """Use the linkage model to compare and score all records in our input df with
+ themselves.
Returns:
- SplinkDataFrame: A SplinkDataFrame of the pairwise comparisons for your
- input records.
+ SplinkDataFrame: Scored pairwise comparisons of the input records to
+ themselves.
"""
original_blocking_rules = (
