Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CU-26gtw2r: improve docs of MetaCAT, include the CUIs filter into the… #243

Merged
merged 1 commit into from
Jul 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion medcat/meta_cat.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,23 @@


class MetaCAT(PipeRunner):
r""" TODO: Add documentation
r"""
The MetaCAT class used for training 'Meta-Annotation' models, i.e. annotations of clinical
concept annotations. These are also known as properties or attributes of recognise entities
in similar tools such as MetaMap and cTakes.

This is a flexible model agnostic class that can learns any meta-annotation task, i.e. any
multi-class classification task for recognised terms.

Args:
tokenizer (TokenizerWrapperBase):
The Huggingface tokenizer instance. This can be a pre-trained tokenzier instance from
a BERT-style model, or trained from scratch for the Bi-LSTM (w. attention) model that
is currently used in most deployments.
embeddings (Tensor, numpy.ndarray):
embedding mapping (sub)word input id n-dim (sub)word embedding.
config (ConfigMetaCAT):
the configuration for MetaCAT. Param descriptions available in ConfigMetaCAT docs.
"""

# Custom pipeline component name
Expand Down
4 changes: 4 additions & 0 deletions medcat/utils/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ def get_important_config_parameters(config):
'value': config.linking['similarity_threshold'],
'description': "If the confidence of the model is lower than this a detection will be ignore."
},
"config.linking['filters']['cuis']": {
'value': len(config.linking['filters']['cuis']),
'description': "Length of the CUIs filter to be included in outputs. If this is not 0 (i.e. not empty) its best to check what is included before using the model"
},
"config.general['spell_check']": {
'value': config.general['spell_check'],
'description': "Is spell checking enabled."
Expand Down