Resource retrieval
Get the pre-trained net:
Out[1]= |  |
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:
Out[2]= |  |
Find the concept unique identifier for the clinical concept "apnea":
Out[3]= |  |
Use the net to obtain the associated embedded vector:
Out[4]= |  |
Out[5]= |  |
Use the embedding layer inside a NetChain:
Out[6]= |  |
Feature visualization
Create two lists of related concepts:
Out[7]= |  |
Out[8]= |  |
Visualize the associated embeddings in two dimensions:
Out[9]= |  |
Visualize the associated embeddings in three dimensions:
Out[10]= |  |
Word analogies
Get the pre-trained net:
Out[11]= |  |
Get a list of concept unique identifiers:
Out[12]= |  |
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":
Out[15]= |  |
Find the five nearest concept unique identifiers to "DNA virus":
Out[16]= |  |
Obtain the human-readable concept labels for these concept unique identifiers:
Out[17]= |  |
Explore similar drugs to a given one. Find the concept unique identifier for "metronidazole":
Out[18]= |  |
Find the five nearest concept unique identifiers to "metronidazole":
Out[19]= |  |
Obtain the human-readable concept labels for these concept unique identifiers:
Out[20]= |  |
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:
Out[21]= |  |
"Premature infant" is to "bronchopulmonary dysplasia" as "obesity" is to:
Out[22]= |  |
Obtain the human-readable concept labels for these concept unique identifiers:
Out[23]= |  |
Net information
Inspect the sizes of all arrays in the net:
Out[24]= |  |
Obtain the total number of parameters:
Out[25]= |  |
Obtain the layer type counts:
Out[26]= |  |
Export to MXNet
Export the net into a format that can be opened in MXNet:
Out[27]= |  |
Export also creates a net.params file containing parameters:
Out[28]= |  |
Get the size of the parameter file:
Out[29]= |  |
The size is similar to the byte count of the resource object:
Out[30]= |  |
Represent the MXNet net as a graph:
Out[31]= |  |