| Algorithm 1 Student state distinction (SSD) algorithm. |
| Input: , , , , , time period length T, threshold and , weights , , , . |
| Output: Inferred learner state for current time period. |
| 1: ; |
| 2: ; |
| 3: if and then |
| 4: Infer learner active state during current time period; |
| 5: else if and then |
| 6: Infer learner inactive state during current time period; |
| 7: else |
| 8: Infer unclear state during current time period; |