14.4.10. crate_anon.linkage.matchresult
crate_anon/linkage/matchresult.py
Copyright (C) 2015, University of Cambridge, Department of Psychiatry. Created by Rudolf Cardinal (rnc1001@cam.ac.uk).
This file is part of CRATE.
CRATE is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
CRATE is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with CRATE. If not, see <https://www.gnu.org/licenses/>.
Match result for fuzzy matching.
- class crate_anon.linkage.matchresult.MatchResult(winner: Person | None = None, best_log_odds: float = -inf, second_best_log_odds: float = -inf, best_candidate: Person | None = None, second_best_candidate: Person | None = None, proband: Person | None = None)[source]
Result of a comparison between a proband (person) and a sample (group of people).
- __init__(winner: Person | None = None, best_log_odds: float = -inf, second_best_log_odds: float = -inf, best_candidate: Person | None = None, second_best_candidate: Person | None = None, proband: Person | None = None)[source]
- Parameters:
winner – The person in the sample (candidate) who matches the proband, if there is a winner by our rules;
None
if there is no winner.best_log_odds – Natural log odds of the best candidate being the same as the proband, –∞ if there are no candidates
second_best_log_odds – The log odds of the closest other contender, which may be –∞.
best_candidate – The person in the sample (candidate) who is the closest match to the proband. May be
None
. If there is a winner, this is also the best person – but the best person may not be the winner (if they are not likely enough, or if there is another close contender).second_best_candidate – The runner-up (second-best) candidate person, or
None
.proband – The proband used for the comparison. (Helpful for parallel processing.)