Moodoo: Indoor Positioning Analytics for Characterising Classroom Teaching

This paper presents Moodoo, a system that models how teachers make use of classroom spaces by automatically analysing indoor positioning traces. We illustrate the potential of the system through an authentic study aimed at enabling the characterisation of teachers’ instructional behaviours in the classroom. Data were analysed from seven teachers delivering three distinct types of classes to +190 students in the context of physics education. Results show exemplars of how teaching positioning traces reflect the characteristics of the learning designs and can enable the differentiation of teaching strategies related to the use of classroom space. The contribution of the paper is a set of conceptual mappings from x − y positional data to meaningful constructs, grounded in the theory of Spatial Pedagogy, and its implementation as a composable library of open source algorithms. These are to our knowledge the first automated spatial metrics to map from low-level teacher’s positioning data to higher-order spatial constructs.


Introduction
Classroom activity is ephemeral, and has largely remained opaque to computational analysis [38], with only a small number of artificial intelligence (AI) innovations targeting physical aspects of teaching and learning [16,38,47,54]. However, despite the online learning revolution, physical classrooms remain pervasive across all educational levels [7]. There is a growing interest in using novel sensing technologies (e.g. wearable and computer vision systems) to automatically analyse classroom activity traces to model behaviours such as engagement [30], teacher-student interactions [10] and students' physical activity [1,53]. Previous research has found that teachers' positioning in the classroom and proximity to students can strongly influence critical aspects such as students' engagement [14], motivation [19], disruptive behaviour [27], and self-efficacy [31] (see review in [43]). Yet, most research focused on studying spatial aspects of teaching rely on observations or peer/self-assessments [11] that are hard to scale up [21], with the purpose supporting teachers, and are susceptible to bias [49].
Tracking systems have emerged recently, enabling the automated capture of positioning and proximity traces from authentic classrooms using wearables attached to students' shoes [48], computer-vision [1] and positioning trackers [18]. Some systems even summarise the time a teacher has spent in close proximity to a student or group of students, to raise an alarm if a threshold is reached (e.g. [5,37]). However, very little work has been done in exploring what kinds of metrics researchers can generate from low-level x − y positioning data that could be useful to characterise classroom activity in ways that are meaningful to educators. This paper presents Moodoo, a system for modelling spatial teaching dynamics. We build on the foundations of Spatial Analysis [20] and Spatial Pedagogy [33] (SP), to explore and propose a set of metrics that can identify teaching positioning strategies in a classroom space. We set the system in an authentic physics education study, in which seven teachers wore indoor positioning trackers while teaching in pairs (see Fig. 1). In total we analysed 18 classes and used the findings to map the x − y positional data to higher-order spatial constructs and propose a composable library of algorithms that can be used to study instructional behaviour of teachers in different teaching scenarios.

Foundations of Spatial Pedagogy
Although fragmented across multiple areas [40], research investigating the relationship between classroom spaces and teaching processes has a long history. In the 19 th century, observational studies by Barnard [8] informed the design of the teacher-centric lecture classroom to maximise surveillance of students. More contemporary works also used systematic observations to investigate how teachers' proximity to students influences aspects that can impact learning such as effective communication [46], disruptive behaviours [27,32], sense of ownership of students' own work [25], and motivation [12].
Lim et al. [33] recently coined the term Spatial Pedagogy (SP) to refer to the meaning of certain spaces in the classroom depending on the positions and distances between teachers, students and classroom resources. Authors observed two teachers using the same classroom to differentiate pedagogical strategies and created state diagrams to represent the spaces of the classroom in which the teacher was moving, frequency to which a space was visited, and transitions. Chin et al. [14] conducted a similar study with four teachers. The authors of these studies suggested the need for automated approaches that could help scale up their analysis, given the potential to support teachers.
In sum, although the literature suggests that teachers' classroom positioning can have a significant effect on learning, most analyses have been based on self-report questionnaires, and observations made on some classes, visualised until recently mostly through manually produced diagrams (e.g. [33]). Automating the analysis of spatial classroom dynamics has the potential to enable new research in learning spaces that can directly support teachers with objective, accurate, and timely feedback. In the next section, we elaborate on current approaches that automatically study teachers' positioning.

Spatial Analysis and Positioning Technology in the Classroom
There has been a growing interest in exploring physical aspects of the classroom [16]. For example, authors have used automated video analysis to model students' posture [45] and gestures [1], teacher's walking [10], interactions between teachers and students [1,53] during a lecture, and characterising the types of social interactions of students in makerspaces [15]. Wearable sensors have also been used to track teachers' orchestration tasks by using a combination of sensors (eye tracker, accelerometer, and a camera) [44] and students' mobility strategies while working in teams in the contexts of primary education [48], healthcare simulation [18] and firefighting training [51]. Some work has attempted to close the feedback loop by displaying some positioning traces back to teachers. For example, ClassBeacons [5] summarises the amount of time a teacher has spent in close proximity to groups of students and displays it through a lamp located at each group's table. Similar work displayed the same information on a screen with alarms indicating potentially neglected students [37], or simple graphs [48] and heatmaps [4] showing what parts of the classroom teachers visited the most.
The above studies indicate that there is an emerging interest in using sensing technologies to analyse teachers' positioning traces. Yet, none of these works have addressed the need for creating spatial metrics (beyond counting the times a teacher comes close to certain students) from the large amounts of indoor positioning data, that may be relevant for teachers' professional development. Whilst we can learn from metrics used in broader areas such as Spatial Analysis [20], these are commonly applied to outdoor data, in which the granularity of the positioning is coarse and the particularities of the educational context are not considered. In fact, there is an identified dearth of indoor positioning analytics tools also in non-educational contexts [13,35,42]. To the best of our knowledge, this paper is the first to document the implementation, and empirical validation, of automated spatial metrics that map from low-level x − y teacher's positioning data to higher-order spatial constructs.

The Learning Context
The authentic learning situation the illustrative study focuses on was part of the regular classes of a first-year undergraduate unit at the University of technology Sydney. This includes weekly 2½ h laboratory classes (labs) in which students run experiments. A teacher and a teaching assistant both co-teach each lab in the physical classroom (see Fig. 1). Each lab typically has between 30 and 40 students working in 10-13 small teams of 2-3 students each. Eighteen labs were randomly chosen (1-18) for the study. All labs were conducted in the same (16.8 × 10 m) classroom equipped with workbenches, a lectern, a whiteboard, and multiple laboratory tools. Seven teachers (T1-T7) were involved in these classes. T1, the unit coordinator, designed the learning tasks and did not teach any class. T2 and T3 were the main teachers for 12 and 6 classes respectively, and T4-T7 supported T2 and T3 as teaching assistants in various combinations.
Each lab exhibited one of three possible learning designs (LD1-3). LD1 was a prescribed lab, in which all students had to do the same experiment following a step-by-step guide. LD2 was a project-based lab, in which students were asked to formulate a testing project, with each team working with a different appliance, such as vacuum cleaners or pedestal fans. Finally, LD3 was a theory-testing lab, in which 4-5 experiments were set up by the teacher and students had to move to one experiment at a time and predict the outcome of each without further guidance.
The labs were conducted with the same students (and not necessarily with the same teachers) in the same classroom for three consecutive weeks (enacting a different LD in each). This means LD1 was enacted in classes 1-6 in week 4 of the term. LD2 was enacted in classes 7-12 in week 5 with the same students from week 4. LD3 was enacted in classes 13-18 in week 6 with the same students from the previous two weeks.

Apparatus
The x and y positions of the two teachers in each lab were automatically recorded through wearable badges (Fig. 1, right) based on the Pozyx ultra-wideband (UWB) system, at a 2 Hz average sampling rate (with an error rate of 10 cm). Eight anchors were affixed to the classroom walls to estimate the positions of the badges. UWB sensors do not require a straight line of sight and are not affected by signals of students' personal devices [2]. The cost of the equipment is relatively low (~1.5 K AUD) making it affordable and portable. Given the large number of teams in each lab (10)(11)(12), the positions of students' experiments were captured by an observer using an observation tool (i.e., iPad) whenever there was a change in the position of teams. For LD1 and LD2, students mostly stayed at the benches where they installed their experiments. For LD3, students moved to each experiment setup, so these were recorded by the observer (Fig. 2).

Moodoo: Indoor Positioning Metrics
This subsection presents the metrics defined for teachers' positioning, grounded in the notion of SP [33]. The metrics have been implemented into a composable open source library in Python (https://gitlab.erc.monash.edu.au/rmat0024/moodoo).

Metrics Related to Teachers' Stops
A teacher's stop can be defined as a sequence of positioning data points that are short distance apart in space and time. According to the notion of SP, this can denote a period in which the teacher is "positioned to conduct formal teaching" or stands "alongside the students' desk or between rows" of seats to interact with students ( [33], pp. 237).
Thus, a stop can be modelled from x − y teacher's data grouping data points based on a centroid C(x, y) point, distance d and time t parameters; where d is the maximum distance from the current data point to C, and t is the minimum time to group consecutive points (see Fig. 3). For example, for our illustrative study we chose d = 1 m, since this distance is considered within a teacher's personal space [50]; and t = 10 s to disregard very short stops. These parameters can be further calibrated according to the context and the tracking technology used. From the defined stop construct, other metrics can be calculated, such as the total or partial number of stops, average stopping time; or more complex metrics in relation to other sources of evidence, such as student locations and classroom resources (e.g. work-benches).

Metrics Related to Teachers' Transitions
A teacher's transition is defined as a sequence of positioning data points that follow a trajectory between two stops. This includes all those positioning traces generated while, for example, the teacher moves from attending one group of students to another group, or, according to the notion of SP, the teacher paces "alongside the rows of students' desks as well as up and down the side of the classroom transforming these sites into supervisory spaces" ( [33], pp. 238).
Although a smoothing algorithm can be used by the sensing software when capturing positioning data [41], each data point is always an estimate (with its associated error) of the actual position. Hence, a linear quadratic estimation algorithm [52] (i.e. Kalman filtering) was applied to the x − y data points as a pre-processing step. Then, the teacher's walking trajectory is modelled as the transition between two consecutive stops in relation to their centroids (see Fig. 3, right). From teachers' transitions, other related metrics can also be calculated, such as the distance walked, speed and acceleration, and the transitions between specific groups of students or classroom areas.

Metrics Related to Teacher-Student Interactions
Lim et al. [33] proposed that a space in the classroom becomes interactional when the teacher is in close proximity to students to enable conversations or consultation. Although this space may be shaped by the learning task, furniture, and preferences [6], extensive work studying cultural aspects of space has identified that a distance from 0.75 to 1.2 m creates optimal opportunities for social interaction [28,36]. Hence, a teacher standing within the interactional space of students (iDis) can be considered as a potential teacher-student interaction. In our study, we accounted for the parameter iDis = 1 m (based on [36]) as the maximum distance to define a teacher's stop within certain students' interactional space. From this construct, other metrics can be calculated, such as teachers' total attention time per student/group, frequency and duration of teachers attending certain students, and sequencing of teacher-student interactions.
Additionally, an index of dispersion can be calculated to identify how evenly teachers' attention was distributed in terms of the number of visits and the total time teachers spent with each student or group. In our illustrative study, we calculated the Gini index [23], which is commonly used to model inequality or dispersion (with a single coefficient output ranging from 0 to 1, where 0 represents perfect equality).

Metrics Related to Proximity to Classroom Resources of Interest
Teachers' proximity to certain resources in the classroom also gives meaning to x − y data. For example, "the space behind the teacher's desk can be described as the personal space where the teacher … prepares for the next stage of the lesson" ( [33], pp. 238) similarly, a space can become authoritative "where the teacher is positioned to conduct formal teaching as well as to provide instructions to facilitate the lesson ( [33], pp. 237). In our study, close proximity to teacher's lectern or a whiteboard, can be indicative of particular activities such as lecturing to the whole class or explaining formulas. For this purpose, the parameter dObj delimits the proximity of objects of interests that are close to the teacher (calibrated to 1 m in the study).

Metrics Related to Co-teaching
Having more than one teacher in the classroom is not an uncommon practice [22]; an example is our illustrative study where pairs of teachers co-taught classes in different combinations. Modelling the instances when both teachers are within each other's interpersonal spaces (dTeacher) can assist teachers to reflect how often and where these events happen in the classroom space, or whether the teachers jointly attend a team of students (i.e. parameter dTeacher = 1 following the same heuristic as above [36]).

Metrics Related to Focus of Positional Presence (Spatial Entropy)
In a qualitative study [39], teachers contrasted two extreme mobility behaviours: 1) a teacher walking around the classroom mostly supervising, without engaging much with students (unfocused positional presence), and 2) a teacher focusing most of his/her attention on a small number of students or remaining only in specific spaces of the classroom (focused presence). From the x − y positioning data, the spectrum between these two extreme behaviours can be modelled based on the notion of spatial entropy [9] which has been used to measure information density in spatial data [3]. To calculate the entropy, we create a m-by-m grid (m = 1 m in our illustrative study) from the two-dimensional x − y data. The proportion of data points in each cell of the grid is calculated, creating a matrix of proportions. This is then vectorised and Shannon entropy is calculated (resulting into a positive number in bits). The closer the number is to zero, the more focused teacher's positioning was to specific students or spaces in the classroom.

Illustrative Study: Analysis and Results
This section demonstrates the potential of the metrics related to the constructs presented above through exemplars of how positioning traces i) reflect the characteristics of the learning design, and ii) can be used to characterise contrasting instructional behaviours.

Dataset, Pre-processing and Analysis
A total of 835,033 datapoints were captured by the indoor positioning system used in the 18 classes taught by pairs of teachers. Each datapoint consisted of i) an identifier of the teacher, ii) a timestamp and iii) x − y coordinates of the classroom position of that teacher in millimetres (e.g., {teacher1, 18/02/2019 9:39:20.34, 5600, 8090}).
Three pre-processing steps were conducted before analysing the data using Moodoo. 1) Sampling normalisation: the positioning data was down sampled to 1 Hz by calculating the average position of a teacher per second. 2) Interpolation: as sensors are susceptible to missing readings for a few seconds [26], a linear interpolation was applied to fill gaps for cases in which there was not at least 1 datapoint per second. The resulting dataset contained 60 positioning data points per minute and per teacher. 3) Segmentation: each class was segmented into three phases according to a common macro-script for the three LDs defined by the unit coordinator. Phase 1 includes the main teacher of the class giving instructions from the lectern (average duration 13 ± 8 min, n = 18). Phase 2 corresponds to the period in which all students start working on the experiment(s) of the day in small teams (1.5 h ± 18 min). Phase 3 corresponds to the time when some teams complete their experiments and start leaving the class (33 ± 22 min). The analysis of this paper focuses on Phase 2, which enables comparison across the classes considered. The resulting dataset comprised a total of 290,228 datapoints.
The data analysis involves processing the x − y positioning data from teachers enacting each learning design (LD1-3) using Moodoo. We report Moodoo's metrics for each teacher by LD, and normalising the results according to the class with the shortest Phase 2 which lasted 1:07 h. We ran a Mann-Whitney's U test to evaluate differences in the metrics among each pair of learning designs (i.e. LD1-LD2; LD1-LD3 and LD2-LD3). Therefore, the median and interquartile range (IQR) values are reported accordingly.

Results
An overview of the resulting teachers' positioning metrics per learning design (LD) are presented in Tables 1 and 2, below. The median and IQR (Q3-Q1) values are presented by metric (columns/cols) and LD (rows). Bar charts are shown at the bottom of each table to facilitate comparison. Significant differences among pairs of LDs (p < 0.05) are emphasised in blue and orange (representing higher and lower values, respectively).   Table 2. Metrics related to teacher-student interactions and proximity to objects in the classroom. Overall, when teachers enacted LD1 they featured a higher number of stops (median 45 stops) than when enacting LD2 and LD3 (35 stops). This difference was not significant given the high variability of teachers' behaviours (see col 1, IQR values, in Table 1).
Yet, stops were significantly longer for LD2 (U = 35, p = 0.02) and LD3 (U = 37, p = 0.02). For example, every time a teacher stopped while enacting LD2 s/he spent a median of 1.4 (IQR 1.6-1) minutes in that position before moving to the next space in the classroom. In contrast, most of the stops during LD1 were briefer (0.8, 1-0.7 min). This can be explained by the nature of students' task. In LD2 and LD3, students worked on more complex projects. In LD1, all students conducted the same (prescribed) experiment with teachers mostly providing corrective feedback, resulting in shorter pauses.
In terms of distance walked and speed, there were no significant differences by learning design (cols 4 and 5). This means that the learning designs did not strongly shape the way the teachers walked in the classroom as a cohort, in this study. However, there were differences between teachers at a per case (exemplified below). Table 2 shows more results for those cases in which teachers were in close proximity to students (cols 1-4) and classroom resources (5-6). There was a significant difference between the three LDs regarding the number of visits to students' experiments (LD1-LD2, U = 36, p = 0.02; LD2-L3, U = 33, p = 0.01; LD1-LD3, U = 13, p = 0.001).
There was a larger number of visits for LD1, in comparison to LD2 (col 2), which contributes to describing a supervisory pedagogical approach [9] provoked by the prescribed learning task. However, the total attention time to experiments was very similar between LD1 and LD2 (column 1, 41.5 and 42.7 min, respectively). In contrast, for the theory-testing lab (LD3) teachers acted as demonstrators, dividing their attention (34, 44-24 min, col 1) visiting around 5 times each of the 4-5 experiments (col 4).
Regarding proximity to objects of interest, teachers significantly spent more time at the lectern and the whiteboard for LD3 compared to LD1 (U = 28, p = 0.01) and LD2 (U = 42, p = 0.04). This can be because in LD1 classes the task is prescribed so teachers did not need to show additional information through the computer (lectern) or whiteboard. For LD2 and LD3, teachers commonly had to explain formulas using the whiteboard. Additionally, classes enacting LD3 occurred later in the semester after student partial results were published, with students often asking clarification questions regarding these LD3 classes. This explains the longer presence of teachers at the lectern.
Finally, the computed index of dispersion (Table 1, col 6) and entropy, did not show any significant difference between LDs. Yet, they enabled the characterisation of contrasting instructional approaches of individual teachers. For example, Fig. 4 shows heatmaps and selected metrics obtained from positioning data of a focused (T6) and an unfocused teacher (T5) in Phase 2 of two LD2 classes. T6 focused on two benches of the classroom (Fig. 4, left), stopping almost half the number of times compared to T5 (25 versus 46 stops). Evidently, the main teacher had to attend students sitting at the remaining desks. This was captured by the metric that counted the times both teachers got close to each other (3 versus 10) suggesting two different co-teaching strategies.
In contrast, T5 remained constantly circulating (see Fig. 4, right), making the space between the work-benches his supervisory zone. The measure of spatial entropy captured this behaviour. T6 featured the lowest entropy among the teachers in the dataset (3.2 bits) whilst for T5 it was the second highest (6.2 bits), pointing at the more spread distribution of datapoints in the classroom space. The index of dispersion, calculated in relation to students' experiments, contributes to characterise the contrasting behaviours with a resulting coefficient very close to 1 for T6 (0.83 -highly unequal distribution of teacher's attention) compared to T5 (0.14 -more even distribution of attention). Finally, teacher-student attention time was higher for the first teacher, who spent much of his time attending 3-4 teams out of the 12 in the class.
In sum, this characterisation of instructional behaviour should provoke reflection among teachers about the different teaching approaches, as it has been previously performed from observations (e.g. [14,33]). Due to space limitations, providing additional metrics and examples is beyond the purpose of this paper. Yet, some additional illustrative examples are provided in the library documentation.

Discussion and Conclusion
Metrics proposed in the paper helped characterise three learning designs using quantifiable observations of classroom positioning data. Such metrics can uncover and bring to the attention of teachers and learning designers certain characteristics that are inherent to learning activities -for instance, increased teacher-student time ratio for a hands-on experiment design versus a lecture delivery.
Our work conveys several implications for research and practice. Teachers can use the resulting metrics to reflect on the proportion of different types of learning activities comprising a teaching session, which can then lead to changes in the learning design as needed. Decisions to intervene and make changes are not automated by algorithms deliberately, as this involves another layer of human interpretation and understanding that suits the learning context in hand. Rather, the metrics can act as tools to aid teachers to make informed decisions [24], which can contribute to the expansion of teachers' classroom capabilities, as envisaged in Luckin's work [34] regarding AI in education. While we note that the teachers would require some form of training to best utilise SP, we also identify the potential for teachers and other stakeholders to identify best teaching practices, as illustrated in our example of contrasting the different pedagogical approaches of two teachers. Finally, the data provided by emerging indoor positioning, along with the metrics proposed in this paper, can contribute to the assessment of specific learning spaces, which is an identified gap in learning spaces research [29].
In terms of limitations of our illustrative study, we note that the parameters might need tuning to work with other types of learning spaces and learning designs, in particular, the thresholds set for defining certain metrics might vary across contexts. For this reason, other classroom spaces that make use of the metrics need to test them for the right fit in their learning contexts. This points at the opportunity to generate learning design-aware classroom positioning metrics, that can guide instructional behavior in ways productive for learning. Moreover, the analysis of significance of the metrics was not intended to support strong claims about what pedagogical approach is better given the size of the dataset and the authentic conditions of the study which introduced several confounding variables. Controlled experimental studies are not recommended as they can hardly replicate emergent and often unexpected classroom situations that occur in authentic classes [17]. Yet, future work could focus on the analysis of a larger dataset with the aim of mining the positioning data to identify patterns that could be used to differentiate instructional behaviours.
In conclusion, this paper presented a set of conceptual mappings from x − y positional data of teachers to higher-order spatial constructs (namely: teacher's stops, transitions, teacher-student interactions, proximity to objects of interest, instances of co-teaching and entropy of teachers' movement), informed by the concept of Spatial Pedagogy [33]. The resulting metrics related to such constructs can facilitate the study of classroom activity in novel ways, which can lead to the expansion of current knowledge about teacher-student proximity and physical behaviours at various learning settings. Future research should certainly further test the applicability of the metrics in other learning settings (i.e. in multi-class open spaces or lecture halls) and, expand the library with metrics that can better model how teachers and students move in such classrooms.