In this recipe, we will work with a dataset containing several features for the employees of a certain company: the area, the sleep quality, whether they recently had a child, diet quality, travel time and performance. In this example, all these features have two levels, but that is obviously not a requirement:
- First, we load the dataset, we define the network, and we plot it. We could use several networks, but this one is a reasonable one to begin with. Note that the performance (maybe the most relevant variable for us here) is impacted by two variables:diet_quality and travel_time. Presumably, people that must travel more are more tired and perform worse at work; also, people who are not eating well, may feel too tired ...