-
Hi, I am getting an error after making an inference with the model after I am done with estimating model parameters. These are steps taken
Estimation of probability_two_random_records_match
Estimation of u probabilities
Estimation of m probabilities
output INFO:splink.internals.settings: Dosent work from here linker = Linker(df_concat, settings, db_api=DuckDBAPI())
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Your problem is this blocking rule: block_on("levenshtein(l.manufacturer, r.manufacturer) <= 2") The function To pass in a custom rule such as yours you can just pass it in as a string: ...
blocking_rules_to_generate_predictions=[
"levenshtein(l.manufacturer, r.manufacturer) <= 2",
block_on("price"),
],
... However we would generally advise against using blocking rules with functions such as |
Beta Was this translation helpful? Give feedback.
Your problem is this blocking rule:
The function
block_on
accepts a column (or column expression such assubstr(name, 1, 5)
), and will generate the blocking rule from that (so e.g.block_on("price")
will get converted to the expressionl.price = r.price
). It will not accept a full condition such as you pass - you can see in the error message that this gets converted to the (ill-formed) blocking ruleLEVENSHTEIN(l.manufacturer, l.manufacturer) <= 2 = LEVENSHTEIN(r.manufacturer, r.manufacturer) <= 2
.To pass in a custom rule such as yours you can just pass it in as a string: