Validation
actantial.validation.compare_annotations(dfs, names=None, id_column='id', metric='krippendorff_alpha', actant_columns=ACTANTS, verbose=False)
Compare multiple sets of actantial annotations and compute an agreement metric.
Aligns all DataFrames on id_column (outer join), then computes the
chosen metric for each actant. Pairwise metrics (accuracy, F1) iterate over
all annotator pairs and average the results. Krippendorff's alpha uses all
coders simultaneously and handles missing values natively.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
dfs
|
List[DataFrame]
|
List of DataFrames with actantial annotations (one per annotator). |
required |
names
|
Optional[List[str]]
|
Annotator names, one per DataFrame. Defaults to |
None
|
id_column
|
str
|
Column name used to align rows across DataFrames. |
'id'
|
metric
|
str
|
Agreement metric. One of |
'krippendorff_alpha'
|
actant_columns
|
list
|
Actant columns to compare. Defaults to the full set defined in the package config. |
ACTANTS
|
verbose
|
bool
|
If True, print warnings about dropped rows. |
False
|
Returns:
| Type | Description |
|---|---|
DataFrame
|
DataFrame with actants as rows (plus an |