===== NEEMS Lecture: 1. Data Analysis ===== In the first section, we analyze a log from an actual robot performance. Every action the robot has done within a chain of tasks is recorded with the help of the knowledge base framework [[http://knowrob.org/|KnowRob]]. The output has already been prepared as a CSV file and can be loaded in this Python context. With the [[https://pandas.pydata.org/|Pandas]] package this data is analyzed and with matplotlib visualized. The goal of this whole tutorial is to predict the next robot action, based on the probable likelihood of action following another. Every entry in the knowledge log is one recorded action; it has an entry for its duration (time to finish), the hierarchical parent action as well as the sequentially previous and next action. Parent action can be understood as a higher-order purpose, including multiple little activities, e.g. picking up an object includes moving to the object, perceiving it, and finally picking it up. The slots startTime and endTime are not set to anything meaningful and are independent of the duration slot. Feel free to look into the narratives' data object. Also, find the constant strings of the table column headers in the file header_names.py, which has been imported in this section's code cells. When the Jupyter Notebook is opened freshly, remember to execute all the code snippets again, such that the variables and functions are defined and usable later in the lecture. Hit the button in the header of the lecture to execute all code blocks at once. If you get stuck somewhere in the lecture, feel free to ask the tutor or consider the following solutions. **Solution** #TODO Create a piechart for label 'Next' narratives[header_names.NEXT].value_counts().plot.pie(figsize=(10,10),autopct='%1.1f%%') {{ :ease:neems_piechart.png |}} In [[https://ease-crc.org/material/ease/machinelearning/data_preparation|the next section]] we will prepare the NEEMS data for training.