Classifying Creatures From a Small Mixed-Type Table

MediumClassical ML

Reported in interviews at Apple

Problem statement

How would you classify a creature as Ghost, Goblin, or Ghoul from a small labeled table? It contains a row identifier, numeric measurements called bone_length, hair_length, rotting_flesh, and has_soul, plus an unordered color field. The classes are roughly balanced. You may use numpy, pandas, scipy, scikit-learn, and statsmodels. Explain and sketch code for feature preparation, model choices, and reliable evaluation.

Show hint

Which columns describe the creature, which merely label the row, and what kind of variable is `color`?

Relevant roles: ML Engineer, Data Scientist and Forward Deployed Engineer.

Related free problems