error_indicator_from_table#

er_evaluation.error_indicator_from_table(error_table)[source]#

Compute error indicator from record error table.

See er_evaluation.error_analysis.error_indicator().

Parameters:

error_table (DataFrame) – Record error table.

Returns:

Error indicator for each reference cluster.

Return type:

Series

Examples

>>> prediction = pd.Series(index=[1,2,3,4,5,6,7,8], data=[1,1,2,3,2,4,4,4])
>>> sample = pd.Series(index=[1,2,3,4,5,6,7, 8], data=["c1", "c1", "c1", "c2", "c2", "c3", "c3", "c3"])
>>> error_table = record_error_table(prediction, sample)
>>> error_indicator_from_table(error_table)
reference
c1    1
c2    1
c3    0
Name: error_indicator, dtype: int64

The result is the same as calling er_evaluation.error_analysis.error_indicator() directly on prediction and sample:

>>> from er_evaluation.error_analysis import error_indicator
>>> error_indicator(prediction, sample)
reference
c1    1
c2    1
c3    0
Name: error_indicator, dtype: int64