concept_selection_evaluator
evaluate(selection_results, gold_standard_file='data/gold_standards/exact_matching_gs.csv', source_id_column='source_concept_id', term_column='cleaned_term', mapped_concept_id_column='mapped_concept_id', mapped_concept_name_column='mapped_concept_name', mapped_rationale_column='mapped_rationale', mapped_method_column='map_method', source_ids=None)
Evaluate the concept selection results against the gold standard.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
selection_results
|
DataFrame
|
Pandas DataFrame containing the results of selection results. |
required |
gold_standard_file
|
str
|
Path to the CSV file containing the gold standard mappings. |
'data/gold_standards/exact_matching_gs.csv'
|
source_id_column
|
str
|
Name of the column with source concept IDs. |
'source_concept_id'
|
term_column
|
str
|
Name of the column with source terms. |
'cleaned_term'
|
mapped_concept_id_column
|
str
|
Name of the column with mapped concept IDs. |
'mapped_concept_id'
|
mapped_concept_name_column
|
str
|
Name of the column with mapped concept names. |
'mapped_concept_name'
|
mapped_method_column
|
Optional[str]
|
Optional: Name of the column with mapping methods, e.g. "verbatim" or "llm". |
'map_method'
|
mapped_rationale_column
|
Optional[str]
|
Optional: Name of the column with mapping rationales. |
'mapped_rationale'
|
source_ids
|
Optional[List[int]]
|
Optional list of source concept IDs to evaluate. If None, evaluate all. |
None
|
Returns:
| Type | Description |
|---|---|
DataFrame
|
A Pandas DataFrame with the evaluation results. |
Source code in src/ariadne/evaluation/concept_selection_evaluator.py
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 | |