Group Abstract Group Abstract

Message Boards Message Boards

Facing your data with Chernoff faces

Posted 10 years ago
POSTED BY: Anton Antonov
6 Replies

Here are links to the related Python package "ChernoffFace" at:

Here is a plot of the "USA arrests" data using that Python package:

enter image description here

Remark: Because of the way the Python matplotlib library is designed the faces in the plot above are wide instead of being long as in the corresponding WL plot.

POSTED BY: Anton Antonov
POSTED BY: Anton Antonov

The MathematicaVsR at GitHub project BrowsingDataWithChernoffFaces compares Mathematica and R codes for interactive data browsers that utilize Chernoff faces.

Here is an image (based on the built-in USA arrests data) from the album of screenshots of the Mathematica-made browser:

enter image description here

POSTED BY: Anton Antonov
POSTED BY: Anton Antonov

Here is a combination of Chernoff faces and SectorChart plots:

facesGrid =
 Grid[ArrayReshape[#, {3, 4}, ""], Dividers -> All, Alignment -> {Left, Top}] &@
  MapThread[
   (asc = 
      AssociationThread[
       Take[Keys@ChernoffFace["FacePartsProperties"], 
         Length[#3] + 1] -> Append[#3, #4]];
     Grid[{
       {Row[{"row:", #1, ", x=", #2}], SpanFromLeft},
       {ChernoffFace[Join[asc, <|"FaceColor" -> Blend[{White, Lighter[Yellow]}, #4]|>], 
         ImageSize -> 150, AspectRatio -> Automatic], 
        SectorChart[Transpose@{ConstantArray[1, Length[#3]], #5}]}}]) &
   , {Range[Length[data]], First /@ data, 
    Transpose[Rescale /@ Transpose[Rest /@ data]], 
    PearsonChiSquareTest[Standardize[Rest[#]], NormalDistribution[0, 1]] & /@ data, 
    Rest /@ data}]

enter image description here

POSTED BY: Anton Antonov

enter image description here - another post of yours has been selected for the Staff Picks group, congratulations !

We are happy to see you at the tops of the "Featured Contributor" board. Thank you for your wonderful contributions, and please keep them coming!

POSTED BY: EDITORIAL BOARD
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard