## 5 Building Prediction Models  
For modeling, the naive Bayes algorithm was used to train the notification usage patterns of users. The naive Bayes algorithm demands low computational resources compared with neural networks and XGBoost [27]. With the naive Bayes model, a notification can be determined to be either phone-preferable or watch-preferable. The model takes 10 features listed in Table 2 as inputs. The naive Bayes model is based on conditional probability. The conditional probability \(P(N_{T}|F_{i})\) denotes the probability of notification \(N\) for type \(T\) on context feature \(F_{i}\) occurring. A context feature \(F_{i}\) is a given condition that causes notification \(N\). In [PERSON] theorem, the probability of notification \(N\) for type \(T\) under a given context feature \(F_{i}\) is defined as  
\[P(N_{T}|F_{i})=\frac{P(F_{i}|N_{T})P(N_{T})}{P(F_{i})},T\in\{phone,watch\} \tag{2}\]  
where \(P(N_{T}|F_{i})\) is the probability of a given context feature \(F_{i}\) occurring when notification \(N\) arrives, and \(P(N_{T})\) is the probability of whether a notification type is phone-preferable. \(P(F_{i})\) is the probability of a given context feature occurring when a notification arrives. The features \(F_{i}\) are summarized in Table 2.  
To apply [PERSON] theorem to our classification problem, we finally used the naive Bayes algorithm, which assumes that all the aforementioned features in the dataset are equally important and independent. The naive Bayes algorithm can be summarized by the following formula:  
\[P(N_{T}|F_{1},\ldots,F_{10})=\frac{1}{Z}p(N_{T})\prod_{i=1}^{10}p(F_{i}|N_{T}) \tag{3}\]  
In the naive Bayes rule, the probability of notification \(N\) for type \(T\), given a context feature provided by features \(F_{1}\) through \(F_{10}\), is equal to the product of the probabilities of each piece of context feature conditioned on notification \(N_{T}\), the prior probability of notification \(N_{T}\), and a scaling factor \(\frac{1}{2}\), where \(Z\) is \(P(F_{1},\ldots,F_{10})\). Finally, the naive Bayes classifier combines this model with the following decision rule. \[\hat{y}=\operatorname*{argmax}_{T\in\{phone,watch\}}p(N_{T})\prod_{i=1}^{10}p( F_{i}|N_{T}) \tag{4}\]  
This rule selects the hypothesis that is the most probable, called the maximum a posteriori probability. Corresponding to this rule, the Bayes classifier assigns notification type \(T\) to the prediction label \(\hat{y}\). Based on the naive Bayes algorithm, we built three types of models: batch learning (BL), plain online learning (PLO), and WTOL. Figure 2 shows how the working of the three differs from each other. The details of each model are as follows: \begin{table}
\begin{tabular}{c c c} \hline \hline
**Title** & **First Period** & **Second Period** \\ \hline _Personal message A_ & 25 & 53 \\ _Personal message B_ & 29 & 99 \\ _Personal message C_ & 7 & 23 \\ \hline \hline \end{tabular}
\end{table} 
Table 6: Contingency table from _Title_ in user \(H\). This feature is considered as time-invariant because \(p\)-value\(>\) 0.05. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Title** & **First Period** & **Second Period** \\ \hline _Personal message A_ & 36 & 62 \\ _Personal message B_ & 21 & 10 \\ \hline \hline \end{tabular}
\end{table} 
Table 7: Contingency table from _Title_ in user \(I\). This feature is considered as time-variant because \(p\)-value \(\leq\) 0.05. * **Batch learning (BL). ** As shown in Figure 2a, the BL algorithm uses batches of collected notifications and sensed data to train a personalized model. BL then predicts the label of the test data using the relationship between the labels and sensed contexts. The BL does not require additional computations after the models are built. However, BL does not have the chance to update the models against new data. Therefore, the models were trained using datasets collected for the first and second periods. * **Plain online learning (POL). ** As shown in Figure 2b, POL continuously updates the models with new incoming data.