Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

seperating matching functions into its own module #20

Merged
merged 10 commits into from
Sep 19, 2024
12 changes: 6 additions & 6 deletions assets/linkage/dibbs_basic_algorithm.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"algorithm": [
{
"funcs": {
"first_name": "feature_match_fuzzy_string",
"last_name": "feature_match_exact"
"first_name": "func:recordlinker.linkage.matchers.feature_match_fuzzy_string",
ericbuckley marked this conversation as resolved.
Show resolved Hide resolved
"last_name": "func:recordlinker.linkage.matchers.feature_match_exact"
},
"blocks": [
{
Expand All @@ -17,7 +17,7 @@
"value": "sex"
}
],
"matching_rule": "eval_perfect_match",
"matching_rule": "func:recordlinker.linkage.matchers.eval_perfect_match",
"cluster_ratio": 0.9,
"kwargs": {
"thresholds": {
Expand All @@ -32,8 +32,8 @@
},
{
"funcs": {
"address": "feature_match_fuzzy_string",
"birthdate": "feature_match_exact"
"address": "func:recordlinker.linkage.matchers.feature_match_fuzzy_string",
"birthdate": "func:recordlinker.linkage.matchers.feature_match_exact"
},
"blocks": [
{
Expand All @@ -51,7 +51,7 @@
"value": "sex"
}
],
"matching_rule": "eval_perfect_match",
"matching_rule": "func:recordlinker.linkage.matchers.eval_perfect_match",
"cluster_ratio": 0.9,
"kwargs": {
"thresholds": {
Expand Down
12 changes: 6 additions & 6 deletions assets/linkage/dibbs_enhanced_algorithm.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"algorithm": [
{
"funcs": {
"first_name": "feature_match_log_odds_fuzzy_compare",
"last_name": "feature_match_log_odds_fuzzy_compare"
"first_name": "func:recordlinker.linkage.matchers.feature_match_log_odds_fuzzy_compare",
"last_name": "func:recordlinker.linkage.matchers.feature_match_log_odds_fuzzy_compare"
},
"blocks": [
{
Expand All @@ -17,7 +17,7 @@
"value": "sex"
}
],
"matching_rule": "eval_log_odds_cutoff",
"matching_rule": "func:recordlinker.linkage.matchers.eval_log_odds_cutoff",
"cluster_ratio": 0.9,
"kwargs": {
"similarity_measure": "JaroWinkler",
Expand Down Expand Up @@ -45,8 +45,8 @@
},
{
"funcs": {
"address": "feature_match_log_odds_fuzzy_compare",
"birthdate": "feature_match_log_odds_fuzzy_compare"
"address": "func:recordlinker.linkage.matchers.feature_match_log_odds_fuzzy_compare",
"birthdate": "func:recordlinker.linkage.matchers.feature_match_log_odds_fuzzy_compare"
},
"blocks": [
{
Expand All @@ -64,7 +64,7 @@
"value": "sex"
}
],
"matching_rule": "eval_log_odds_cutoff",
"matching_rule": "func:recordlinker.linkage.matchers.eval_log_odds_cutoff",
"cluster_ratio": 0.9,
"kwargs": {
"similarity_measure": "JaroWinkler",
Expand Down
24 changes: 12 additions & 12 deletions src/recordlinker/linkage/algorithms.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,30 +25,30 @@
DIBBS_BASIC = [
alhayward marked this conversation as resolved.
Show resolved Hide resolved
{
"funcs": {
"first_name": "feature_match_fuzzy_string",
"last_name": "feature_match_exact",
"first_name": "func:recordlinker.linkage.matchers.feature_match_fuzzy_string",
"last_name": "func:recordlinker.linkage.matchers.feature_match_exact",
},
"blocks": [
{"value": "birthdate"},
{"value": "mrn", "transformation": "last4"},
{"value": "sex"},
],
"matching_rule": "eval_perfect_match",
"matching_rule": "func:recordlinker.linkage.matchers.eval_perfect_match",
"cluster_ratio": 0.9,
"kwargs": {"thresholds": FUZZY_THRESHOLDS},
},
{
"funcs": {
"address": "feature_match_fuzzy_string",
"birthdate": "feature_match_exact",
"address": "func:recordlinker.linkage.matchers.feature_match_fuzzy_string",
"birthdate": "func:recordlinker.linkage.matchers.feature_match_exact",
},
"blocks": [
{"value": "zip"},
{"value": "first_name", "transformation": "first4"},
{"value": "last_name", "transformation": "first4"},
{"value": "sex"},
],
"matching_rule": "eval_perfect_match",
"matching_rule": "func:recordlinker.linkage.matchers.eval_perfect_match",
"cluster_ratio": 0.9,
"kwargs": {"thresholds": FUZZY_THRESHOLDS},
},
Expand All @@ -57,15 +57,15 @@
DIBBS_ENHANCED = [
{
"funcs": {
"first_name": "feature_match_log_odds_fuzzy_compare",
"last_name": "feature_match_log_odds_fuzzy_compare",
"first_name": "func:recordlinker.linkage.matchers.feature_match_log_odds_fuzzy_compare",
"last_name": "func:recordlinker.linkage.matchers.feature_match_log_odds_fuzzy_compare",
},
"blocks": [
{"value": "birthdate"},
{"value": "mrn", "transformation": "last4"},
{"value": "sex"},
],
"matching_rule": "eval_log_odds_cutoff",
"matching_rule": "func:recordlinker.linkage.matchers.eval_log_odds_cutoff",
"cluster_ratio": 0.9,
"kwargs": {
"similarity_measure": "JaroWinkler",
Expand All @@ -76,16 +76,16 @@
},
{
"funcs": {
"address": "feature_match_log_odds_fuzzy_compare",
"birthdate": "feature_match_log_odds_fuzzy_compare",
"address": "func:recordlinker.linkage.matchers.feature_match_log_odds_fuzzy_compare",
"birthdate": "func:recordlinker.linkage.matchers.feature_match_log_odds_fuzzy_compare",
},
"blocks": [
{"value": "zip"},
{"value": "first_name", "transformation": "first4"},
{"value": "last_name", "transformation": "first4"},
{"value": "sex"},
],
"matching_rule": "eval_log_odds_cutoff",
"matching_rule": "func:recordlinker.linkage.matchers.eval_log_odds_cutoff",
"cluster_ratio": 0.9,
"kwargs": {
"similarity_measure": "JaroWinkler",
Expand Down
Loading
Loading