plotting.hinton#
Hinton diagram visualization.
Functions
Draw a Hinton diagram of a matrix. |
- hinton_diagram( ) None[source]#
Draw a Hinton diagram of a matrix.
The color of each square reflects the sign of the corresponding matrix element, and the size of each square reflects the magnitude of the corresponding element.
Code adapted from here.
- Parameters:
Examples
>>> import numpy as np >>> from latents.plotting import hinton_diagram >>> C = np.random.normal(size=(10, 5)) >>> hinton_diagram(C)