AttributeError when using threshold_selection_tool_from_labels_table with DuckDBLinker #2193
Ahosseinzadeh723
started this conversation in
General
Replies: 1 comment
-
Edit 2: The problem is that this tool appeared in 3.9.14, so you need to upgrade! The following is a script that I tested as working on 3.9.14 import splink.duckdb.comparison_library as cl
from splink.datasets import splink_dataset_labels, splink_datasets
from splink.duckdb.blocking_rule_library import block_on
from splink.duckdb.linker import DuckDBLinker
df = splink_datasets.fake_1000
settings = {
"link_type": "dedupe_only",
"blocking_rules_to_generate_predictions": [
block_on(["first_name"]),
block_on(["surname"]),
],
"comparisons": [
cl.jaro_winkler_at_thresholds(
"first_name", 0.9, term_frequency_adjustments=True
),
cl.exact_match("surname"),
cl.levenshtein_at_thresholds("dob"),
cl.exact_match("city", term_frequency_adjustments=True),
cl.exact_match("email"),
],
}
linker = DuckDBLinker(df, settings)
linker.estimate_probability_two_random_records_match(
[block_on(["first_name", "surname", "dob"])], recall=0.7
)
linker.estimate_parameters_using_expectation_maximisation(block_on(["first_name"]))
linker.estimate_parameters_using_expectation_maximisation(block_on(["surname"]))
labels_splink_df = linker.register_labels_table(splink_dataset_labels.fake_1000_labels)
linker.threshold_selection_tool_from_labels_table(labels_splink_df) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm currently working with splink 3.9.13 and trying to utilize the threshold_selection_tool_from_labels_table function as demonstrated in the documentation found here
I've prepared my labeled table as instructed here
However, when I attempt to execute the following line of code:
I receive the following error:
This suggests that the DuckDBLinker object does not have the threshold_selection_tool_from_labels_table method. Is this functionality not supported for DuckDBLinker, or is this an issue with the library version or documentation?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions