Skip to content

adamburkegh/chernoff

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chernoff Faces

Chernoff faces are a whimsical data visualization technique invented by Hermann Chernoff, exploiting the ability of human brains to recognize small differences in facial features easily.

This simple library uses matplotlib and adapts an earlier version by Abraham Flaxman (@aflaxman). As well as the traditional 18 variables, it adds hair.

Output example

I first learned of this technique from the novel Blindsight, by Peter Watts, which is excellent, and everyone should go and read. And I guess I should mention some criticisms of the technique. A good roundup is by Robert Kosara. Lee et al (see References) also found some empirical evidence that interpreting Chernoff Faces can actually be slow and inaccurate. So have a think about that too, if you're actually planning to use these in some serious context.

Installation

pip install -r requirements.txt

(I use a venv)

Example Use

    vec[EYE_SIZE] = precision
    vec[EYEBROW_SLANT] = 1-simplicity
    ax = fig.add_subplot(5,5,1+offset,aspect='equal')
    cface(ax, *vec)

See pmqfaces.py for a full working example.

References

Herman Chernoff, The Use of Faces to Represent Points in K-Dimensional Space Graphically, Journal of the American Statistical Association, vol. 68, no. 342, pp. 361–368, 1973.

Lee, M. D., Reilly, R. E., & Butavicius, M. E. (2003). An empirical evaluation of Chernoff faces, star glyphs, and spatial visualizations for binary data. Proceedings of the Asia-Pacific Symposium on Information Visualisation - Volume 24, 1–10.

About

Chernoff Faces for Process model quality

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages