Message Boards Message Boards

Control chernoff's faces package settings?

Posted 7 years ago
POSTED BY: Sheriff Sheriff
2 Replies

thank you very much !

POSTED BY: Sheriff Sheriff

As explained in "Facing your data with Chernoff faces" you can/should use an Association giving values to the facial features of interest.

ChernoffFace["Properties"]

(* <|"FaceLength" -> 0.5, "ForeheadShape" -> 0.5, 
 "EyesVerticalPosition" -> 0.5, "EyeSize" -> 0.5, "EyeSlant" -> 0.5, 
 "LeftEyebrowSlant" -> 0.5, "LeftIris" -> 0.5, "NoseLength" -> 0.5, 
 "MouthSmile" -> 0.5, "LeftEyebrowTrim" -> 0.5, 
 "LeftEyebrowRaising" -> 0.5, "MouthTwist" -> 0.5, 
 "MouthWidth" -> 0.5, "RightEyebrowTrim" -> 0.5, 
 "RightEyebrowRaising" -> 0.5, "RightEyebrowSlant" -> 0.5, 
 "RightIris" -> 0.5, "FaceColor" -> GrayLevel[1], 
 "IrisColor" -> GrayLevel[0.85], "NoseColor" -> Automatic, 
 "MouthColor" -> GrayLevel[0], "EyeBallColor" -> GrayLevel[1], 
 "MakeSymmetric" -> True|> *)

faceFeatures = {"FaceLength", "FaceColor", "LeftEyebrowSlant", "EyeSize", "MouthSmile"};
faces = Map[
   ChernoffFace[
     AssociationThread[faceFeatures, MapAt[ColorData["TemperatureMap", "ColorFunction"], #, 2]]] &, 
   VariablesRescale[data]];

Row[{Grid[
   Partition[#, 4] &@Map[Append[#, ImageSize -> 100] &, faces]], 
  "   ", Magnify[#, 0.85] &@
   GridTableForm[List /@ faceFeatures, 
    TableHeadings -> {"Face part"}]}]

enter image description here

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

Group Abstract Group Abstract