Resource retrieval
Get the pre-trained net:
Basic usage
This net represents clinical concepts as 500-dimensional vectors. Concepts are identified by their concept unique identifier (CUI). The mapping between identifiers and human-readable concepts can be obtained from the clinical concepts ResourceData:
Find the concept unique identifier for the clinical concept "apnea":
Use the net to obtain the associated embedded vector:
Use the embedding layer inside a NetChain:
Feature visualization
Create two lists of related concepts:
Visualize the associated embeddings in two dimensions:
Visualize the associated embeddings in three dimensions:
Word analogies
Get the pre-trained net:
Get a list of concept unique identifiers:
Obtain the embeddings:
Create an association whose keys are concept unique identifiers and whose values are vectors:
Find the concept unique identifier for the clinical concept "DNA virus":
Find the five nearest concept unique identifiers to "DNA virus":
Obtain the human-readable concept labels for these concept unique identifiers:
Explore similar drugs to a given one. Find the concept unique identifier for "metronidazole":
Find the five nearest concept unique identifiers to "metronidazole":
Obtain the human-readable concept labels for these concept unique identifiers:
Identify comorbidity relationships: a comorbidity is a disease or condition that frequently accompanies the primary diagnosis. A comorbidity for the condition "premature infant" is "bronchopulmonary dysplasia." Comorbidities of another condition--for example, obesity--can be investigated using word analogies. First obtain the relevant CUIs:
"Premature infant" is to "bronchopulmonary dysplasia" as "obesity" is to:
Obtain the human-readable concept labels for these concept unique identifiers:
Net information
Inspect the sizes of all arrays in the net:
Obtain the total number of parameters:
Obtain the layer type counts:
Export to MXNet
Export the net into a format that can be opened in MXNet:
Export also creates a net.params file containing parameters:
Get the size of the parameter file:
The size is similar to the byte count of the resource object:
Represent the MXNet net as a graph: