LingPy

This documentation is for version 2.0.dev, which is not released yet.

lingpy.evaluate.acd.diff

lingpy.evaluate.acd.diff(lex, gold='cogid', test='lexstatid', loans=True, pprint=True, filename='', tofile=True)

Write differences in classifications on an item-basis to file.

lex : lingpy.compare.lexstat.LexStat
The LexStat class used for the computation. It should have two columns indicating cognate IDs.
gold : str (default=’cogid’)
The name of the column containing the gold standard cognate assignments.
test : str (default=’lexstatid’)
The name of the column containing the automatically implemented cognate assignments.
loans : bool (default=True)
If set to c{False}, loans (indicated by negative IDs in the gold standard) will be treated as separate cognates, otherwise, loans will be treated as cognates.
pprint : bool (default=True)
Print out the results
filename : str (default=’‘)
Name of the output file. If not specified, it is identical with the name of the LexStat, but with the extension diff.
tofile : bool (default=True)
If set to c{False}, no data will be written to file, but instead, the data will be returned.
Returns :

t : tuple

A nested tuple consisting of two further tuples. The first containing precision, recall, and harmonic mean (F-scores), the second containing the same values for the pair-scores.

See also

bcubes, pairs

Notes

If the tofile option is chosen, the results are written to a specific file with the extension diff. This file contains all cognate sets in which there are differences between gold standard and test sets. It also gives detailed information regarding false positives, false negatives, and the words involved in these wrong decisions.

This Page