openai / deeptype

Code for the paper "DeepType: Multilingual Entity Linking by Neural Type System Evolution"
https://arxiv.org/abs/1802.01021
Other
647 stars 147 forks source link

How can i use an evolved type system only? #52

Closed ktlsn1234 closed 5 years ago

ktlsn1234 commented 5 years ago

Hello, I have a question about using discovered type system (e.g. cem, greedy, ga ..)

I train type classifier with discovered type system(from evolve_type_system) using train config from TypeSystemToNeuralTypeSystem.ipynb. but at prediction time, there is no 'type' in get_prob() at learning/SentencePredictions.ipynb.

I guess it seems because discovered type system does not include type classification.

How should the get_prob() be when i use only discovered type system?

JonathanRaiman commented 5 years ago

If you look a the JSON for your training of the discovered type system, each type axis has a name (surname in typename = types["qid"] relation = types["relation"] surname = typename + "_" + relation.replace(" ", "_") from TypeSystemToNeuralTypeSystem.ipynb). This is the axis you have access to and can query. I recommend looking for probabilities programmatically rather than retyping the names (e.g. look at the model's objectives field for the names of the axes).