Summary
Remove the AlgorithmPass.kwargs field and replace it with specific fields for fuzzy matching and log odds parameters.
Acceptance Criteria
Details / Tasks
Use the snippet below as a basis for the additions that should be made to account for the deletion of the kwargs attribute. Note, specific require Algorithm/AlgorithmPass attributes have been omitted and replaced with ... as to highlight the additions that are being made.
{
...
"log_odds": [
{"feature": "ADDRESS", "value": 8.4},
...
],
"defaults": {
"fuzzy_match_threshold": 0.9,
"fuzzy_match_measure": "JaroWinkler"
},
"passes": [
{
...
"evaluators": [
{
"feature": "FIRST_NAME",
"func": "func:recordlinker.linking.matchers.compare_probabilistic_fuzzy_match"
},
{
"feature": "LAST_NAME",
"func": "func:recordlinker.linking.matchers.compare_probabilistic_fuzzy_match",
"fuzzy_match_threshold": 0.95, // [OPTIONAL]
"fuzzy_match_measure": "Levenshtein" // [OPTIONAL]
}
],
"true_match_threshold": 12.2
}
]
}
Background / Context
kwargs is too vague and doesn't allow for the validation that we'd like when parsing changes to an Algorithm. Creating independent fields for the values we are trying to capture allows for those changes.
Notes / Comments
This will be a breaking change, and will need to be documented in our release notes accordingly. Specifically, we'll need to state that the algorithm and algorithm pass tables need to be deleted before upgrading to this release.
Summary
Remove the
AlgorithmPass.kwargsfield and replace it with specific fields for fuzzy matching and log odds parameters.Acceptance Criteria
log_oddsto Algorithm in schema/algorithm.py and models/algorithm.pyfuzzy_match_thresholdto Algorithm in schema/algorithm.py and models/algorithm.pyfuzzy_match_measureto Algorithm in schema/algorithm.py and models/algorithm.pyfuzzy_match_thresholdto AlgorithmPass.evaluators in schema/algorithm.py and models/algorithm.pyfuzzy_match_measureto AlgorithmPass.evaluators in schema/algorithm.py and models/algorithm.pytrue_match_thresholdto AlgorithmPass in schema/algorithm.py and models/algorithm.pykwargsfrom AlgorithmPass in schema/algorithm.py and models/algorithm.pyDetails / Tasks
Use the snippet below as a basis for the additions that should be made to account for the deletion of the
kwargsattribute. Note, specific require Algorithm/AlgorithmPass attributes have been omitted and replaced with...as to highlight the additions that are being made.{ ... "log_odds": [ {"feature": "ADDRESS", "value": 8.4}, ... ], "defaults": { "fuzzy_match_threshold": 0.9, "fuzzy_match_measure": "JaroWinkler" }, "passes": [ { ... "evaluators": [ { "feature": "FIRST_NAME", "func": "func:recordlinker.linking.matchers.compare_probabilistic_fuzzy_match" }, { "feature": "LAST_NAME", "func": "func:recordlinker.linking.matchers.compare_probabilistic_fuzzy_match", "fuzzy_match_threshold": 0.95, // [OPTIONAL] "fuzzy_match_measure": "Levenshtein" // [OPTIONAL] } ], "true_match_threshold": 12.2 } ] }Background / Context
kwargs is too vague and doesn't allow for the validation that we'd like when parsing changes to an Algorithm. Creating independent fields for the values we are trying to capture allows for those changes.
Notes / Comments
This will be a breaking change, and will need to be documented in our release notes accordingly. Specifically, we'll need to state that the algorithm and algorithm pass tables need to be deleted before upgrading to this release.