Skip to content

Commit

Permalink
Merge pull request CogStack#243 from CogStack/more-doc-improvements
Browse files Browse the repository at this point in the history
CU-26gtw2r: improve docs of MetaCAT, include the CUIs filter into the…
  • Loading branch information
tomolopolis authored Jul 5, 2022
2 parents 70bbe9f + 77cfe43 commit 4a1aee6
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
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

0 comments on commit 4a1aee6

Please sign in to comment.