Coder Social home page Coder Social logo

chernoff's Introduction

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.

chernoff's People

Contributors

adamburkegh avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.