estimate_confidence
- estimate_confidence(mappings: Collection[SemanticMapping], *, confidence_model: Literal['binomial', 'mean'] | None = None, check: bool = True, precision: int | None = None) float[source]
Estimate the confidence of a subject-predicate-triple based on multiple evidences.
- Parameters:
mappings – A collection of mappings that all have the same subject-predicate-object triple. This algorithm explicitly handles when there is a negative predicate modifier.
confidence_model –
Which confidence model to use when aggregating mapping confidences.
mean aggregation is \(\frac{1}{n} \sum_{i=1}^n c_i\)
binomial aggregation is \(1 - \prod_{i=1}^n (1 - c_i)\)
check – Should mappings be checked to all have the same subject-predicate-object triple? This can be disabled if you’re sure they already match
- Returns:
A single floating point confidence estimate of the positive subject-predicate-object triple, where 1.0 is highly confident and 0.0 is not confident. To get the confidence for the negated subject-predicate-object triple, subtract this return value from 1.0.
Note
We define the confidence in an empty list to be 1.0