Evaluations¶
Metrics¶
- ontolearner.evaluation.metrics.non_taxonomic_re_metrics(y_true: List[Dict[str, str]], y_pred: List[Dict[str, str]]) Dict[str, float | int][source]¶
- ontolearner.evaluation.metrics.taxonomy_discovery_metrics(y_true: List[Dict[str, str]], y_pred: List[Dict[str, str]]) Dict[str, float | int][source]¶
- ontolearner.evaluation.metrics.term_typing_metrics(y_true: List[Dict[str, List[str]]], y_pred: List[Dict[str, List[str]]]) Dict[str, float | int][source]¶
Compute precision, recall, and F1-score for term typing using (term, type) pair-level matching instead of ID-based lookups.
- Parameters:
y_true – List of ground truth dicts, each with keys {“term”: str, “types”: List[str]}
y_pred – List of predicted dicts, same format as y_true
- Returns:
Containing precision, recall, and F1-score
- Return type:
Dict
- ontolearner.evaluation.metrics.text2onto_metrics(y_true: Dict[str, Any], y_pred: Dict[str, Any], similarity_threshold: float = 0.8) Dict[str, Any][source]¶
- Expects:
- y_true = {“terms”: [{“doc_id”: str, “term”: str}, …],
“types”: [{“doc_id”: str, “type”: str}, …]}
y_pred = same shape
- Returns:
{…}, “types”: {…}}
- Return type:
{“terms”