ehrapy.tools.mc.get_annotation_overview#

static mc.get_annotation_overview(medcat_obj, n=10, status='Affirmed', save_to_csv=False, save_path='.')#

Provide an overview for the annotation results. An overview will look like the following:

cui (the CUI), nsubjects (from how many rows this one got extracted), type_ids (TUIs), name(name of the entitiy), perc_subjects (how many rows relative to absolute number of rows) :rtype: None

Args:

medcat_obj: The current MedCAT object which holds all infos on NLP analysis with MedCAT and ehrapy. n: Basically the parameter for head() of pandas Dataframe. How many of the most common entities should be shown? status: One of “Affirmed” (default), “Other” or “Both”. Displays stats for either only affirmed entities, negated ones or both. save_to_csv: Whether to save the overview dataframe to a local .csv file in the current working directory or not. save_path: Path to save the overview as .csv file. Defaults to current working directory.

Returns:

A Pandas DataFrame with the overview stats.