Repository navigation
Conversation
|
This is big weow. Before I attempt the nitty gritty theres high level questions. I see the guide says: as a guide on how to run it. But in this PR you say: How is this tiering concept... performance over any single dataset? Unless this model has been trained on that given dataset after you mean? I kinda have two or three (or four) different questions for this:
I think it still has uses. Say in a cardiology project you could say "we're a bit naff at concepts <x,y,z>", for some disclaimers. Or where you're "strong". I'm just sceptical how it informs training - unless you're going to buy annotations concepts that are Tier C... somehow. I'll look into the code more detailed later. It's a big boy. |
Good point, the guide / README should clearly note that only estimating for a few concepts is unlikely to be super informative.
The above comparison is taking the concepts in the Snomed CT linking challenge dataset and estimating their performance. Then it's running
I think this may not be quite clear in all of the documentation. So this is a tool intended to be used at the early stages of a project. Where there is an idea of what types of concepts will be of interest, but there is no curated data yet and/or there is no annotations / annotators yet available. It's intended to help someone plan for this. Now, the other side is that given how poorly its estimations are doing, this might not do that well at what it's trying to do. But there is some signal here. EDIT: To answer the questions more directly:
|
|
If in: 195967001,22298006 are CUIs you know are in the snomed entity challenge set. Why don't you offer the option to link to a trainer export file so all cuis can be done there, rather than manually entering all of them into the estimator. unless I've missed that option. (I now see --cui-file, could this lazily be a trainer export?) A final high level question before I look at the code; this only works with the core components - right? |
That's precisely counter to the point. If you have a trainer export, you don't need to estimate performance. You can just evaluate it by running metrics. This estimation business (i.e this PR) is for when you do not have the luxury of existing data.
Stage 1 / ontology estimation is a general estimation on how ambiguous something is. So that will - in principle - estimate any components that base their estimations on the CDB (i.e the concepts and their synonyms). With that said, for different implementations we'd almost certianly need a different calibration curve (i.e stage 3). So if there is some signal from the same pieces of information, it could still estimate something. With that said, as you can see from the estimations, they're not super accurate anyway. So I'd assume they'd be even worse for something I didn't try to match them to. But at the same time, I don't know that for a fact. |
|
OKay - i see that the CUIs you used were an example - i.e. you want to see how you do with those cuis before you decide to train. All understood. |
| """Returns the total number of concepts in the whole ontology.""" | ||
|
|
||
|
|
||
| class SnomedGraph(AbstractOntologyGraph): |
There was a problem hiding this comment.
This is only useful for SNOMED?
There was a problem hiding this comment.
I suppose it could work for anything that defines pt2ch in the same manner. But that's not really well defined for anything else (in terms of model building that is).
There was a problem hiding this comment.
I'd abstract this if you care enough to then. Document it works for snomed if you prefer.
Up to you.
| concept vectors, so a raw cosine can be judged relative to what's normal | ||
| for this embedding space rather than taken at face value. | ||
|
|
||
| Contextual embedding spaces are usually anisotropic -- raw cosines |
There was a problem hiding this comment.
When we say contextual embedding spaces here - and a brief scroll through this file. I think this can only used the vector context model (with xsmall -> xlarge contexts weights). I may be wrong on this...
Just a minor point on terminology - these embedding spaces are not contextual. That would be LSTM embeddings and beyond.
I'm not sure at this point if you can use this on transformer NER. Just checking that this is only for the vector context model trained models.
There was a problem hiding this comment.
In principle, if some other component saves the context vectors in the same manner (and/or changes the config in line with how it saves them), this could work with some other component as well.
But more realistically some other component probably won't even touch these things and thus there will be nothing for this to use for estimations.
And you could use this with transformers NER, I just don't see a world where it'll do a good job at the estimation. Or - perhaps more accurately - I'd expect it to do even worse.
This doesn't touch the components themselves. It touches the central pieces. But many non-default components (such as transformers NER and embedding linker) probably just don't touch these (i.e train counts and per cui context vectors in CDB.cui2info).
As for the terminology, I should have paid more careful attention on what was in there. But the point is that there's no expectation that the range of cosine simularity values spans the entire theoretical range (i.e from -1 to 1).
This PR adds a separate perfomance estimation project to the project.
There's a lot in the project README.
But the TLDR I would say is the following:
I'll throw in some noisy plots as well

As we can see the average performance for tier A is higher than B, which is higher than C (sorry for the odd layout).