\section{Results}
\label{sec:inference}

\begin{table*}
    \caption{{t-statistic (p-value=<0.05:*; =<0.5:**; >0.5: ***) and Cohen's-d (95\% confidence intervals do not overlapping with zero: *) of activity-level and statistical features for personality traits in DPQ and MCPQ-R:} Night (12am-6am), Morning (6am-12pm), and Afternoon (12pm-6pm) are denoted by N, M, and A, respectively; t-statistic and Cohen's-d values are sorted in descending order, with the highest value of each trait in boldface. Results for activity-level features (left) and statistical features (right) are shown separately. Standard notation min, max, mean, median, std were used for minimum, maximum, mean, median, and standard deviation of the signal, respectively. Other notations include: acceleration -- acceleration value was calculated in Section~\ref{subsec:data_processing_pipeline}, acc -- accelerometer, gyro -- gyroscope, x,y,z -- axes of the accelerometer and gyroscope, \% -- percentage of time spent doing a particular activity, ecdf -- empirical cumulative distribution function.}
    \label{tab:tstatistics}
    \resizebox{1.02\textwidth}{!}{%
    \begin{tabular}{l l r l r | l r l r}

     &
     \multicolumn{4}{c}{\cellcolor[HTML]{FFFFFF}\textbf{Activity-Level}} &
     \multicolumn{4}{c}{\cellcolor[HTML]{FFFFFF}\textbf{Statistical}}
     \\

    \cmidrule{2-9}

    &
    \multicolumn{8}{c}{\cellcolor[HTML]{FFFFFF}\textbf{DPQ}}
    \\

    \cmidrule{2-9}

    &
    &
    \textit{t-statistic} &
    &
    \textit{Cohen's-d} &
    &
    \textit{t-statistic} &
    &
    \textit{Cohen's-d}
    \\

    %

    %

    \multirow{5}{1.9cm}{\textbf{Fearfulness}} &
    \textbf{sedentary \% (A)}        & \textbf{(-) 3.55*}    &
    \textbf{sedentary \% (A)}        & \textbf{0.88*}        &
    \textbf{gyro z histogram\_5 (N)} &  \textbf{(+) 17.92*} &
    \textbf{gyro z histogram\_5 (N)} & \textbf{4.46*}
    \\

    &
    light \% (N)        & (-) 3.12*    &
    light \% (N)        & 0.78*        &
    gyro z histogram\_5 (M) &  (+) 13.07* &
    gyro z histogram\_5 (M) & 3.25*
    \\

    &
    acceleration std (M) & (+) 2.46*    &
    acceleration std (M) & 0.61*        &
    gyro z histogram\_6 (N) &  (+) 12.86* &
    gyro z histogram\_6 (N) & 3.21*
    \\

    &
    sedentary \% (M)        & (-) 2.43*    &
    sedentary \% (M)        & 0.60*        &
    gyro z zero\_crossing\_rate (N) &  (+) 9.94* &
    gyro z zero\_crossing\_rate (N) & 2.47*
    \\

    &
    sleep \% (A)        & (+) 2.37*    &
    acceleration std (A)        & 0.59*        &
    gyro z histogram\_6 (M) &  (+) 9.56* &
    gyro z histogram\_6 (M) & 2.38*
    \\

    \arrayrulecolor{Gray}
    \cmidrule{2-9}

    %

    %

    \multirow{5}{1.9cm}{\textbf{Aggression Towards People}} &
    \textbf{light \% (M)}        & \textbf{(+) 1.74**}    &
    \textbf{light \% (M)}        & \textbf{0.43}        &
    \textbf{gyro y histogram\_8 (N)} &  \textbf{(-) 4.44*} &
    \textbf{gyro y histogram\_8 (N)} & \textbf{1.11*}
    \\

    &
    light \% (A)        & (+) 1.31**    &
    light \% (A)        & 0.32        &
    gyro y histogram\_4 (N) &  (+) 4.40* &
    gyro y histogram\_4 (N) & 1.09*
    \\

    &
    sleep \% (M)        & (-) 1.16***    &
    sleep \% (M)        & 0.29        &
    acc x histogram\_5 (M) &  (-) 4.38* &
    gyro y histogram\_8 (M) & 1.09*
    \\

    &
    moderate-vigorous \% (N)        & (-) 1.08***    &
    moderate-vigorous \% (N)         & 0.27        &
    gyro y histogram\_8 (M) &  (-) 4.35* &
    acc x histogram\_5 (M) & 1.09*
    \\

    &
    light \% (N)        & (+) 0.72***    &
    light \% (N)         & 0.17*        &
    gyro y histogram\_7 (M) &  (-) 4.33* &
    gyro y histogram\_7 (M) & 1.08*
    \\

    \arrayrulecolor{Gray}
    \cmidrule{2-9}

    %

    %

    \multirow{5}{1.9cm}{\textbf{Excitability}} &
    \textbf{sedentary \% (A)}        & \textbf{(+) 2.05*}    &
    \textbf{sedentary \% (A)}        & \textbf{0.51*}        &
    \textbf{gyro z histogram\_5 (M)} &  \textbf{(-)v5.86*} &
    \textbf{gyro z histogram\_5 (M)} & \textbf{1.45*}
    \\

    &
    acceleration std (A)     & (-) 1.50**    &
    acceleration std (A)     & 0.37        &
    gyro z histogram\_5 (N) &  (-) 5.85* &
    gyro z histogram\_5 (N) & 1.45*
    \\

    &
    light \% (M)        & (-) 1.44**    &
    light \% (M)          & 0.36        &
    gyro z zero\_crossing\_rate (M) &  (-) 5.67* &
    gyro z zero\_crossing\_rate (M) & 1.41*
    \\

    &
    sedentary \% (M)        & (+) 1.32**    &
    sedentary \% (M)      & 0.33        &
    gyro z zero\_crossing\_rate (N) &  (-) 5.63* &
    gyro z zero\_crossing\_rate (N) & 1.40*
    \\

    &
    acceleration max (A)        & (-) 1.27*    &
    acceleration max (A)        & 0.32        &
    gyro y zero\_crossing\_rate (N) &  (-) 5.54* &
    gyro y zero\_crossing\_rate (N) & 1.37*
    \\

    \arrayrulecolor{Gray}
    \cmidrule{2-9}

    %

    %

    \multirow{5}{1.9cm}{\textbf{Responsiveness to Training}} &
    \textbf{light \% (M)}        & \textbf{(-) 2.17*}    &
    \textbf{light \% (M)}        & \textbf{0.52*}        &
    \textbf{acc x mean (M)} &  \textbf{(+) 4.06*} &
    \textbf{acc x mean (M)} & \textbf{0.99*}
    \\

    &
    light \% (A)        & (-) 1.76**    &
    light \% (A)        & 0.42        &
    gyro x ecdf\_\_perc\_0 (M) &  (+) 3.87* &
    gyro x histogram\_8 (A) & 0.97*
    \\

    &
    sleep \% (M)        & (+) 1.52**    &
    sleep \% (M)        & 0.38        &
    gyro z ecdf\_\_perc\_0 (M) &  (+) 3.81* &
    gyro x histogram\_7 (A) & 0.95*
    \\

    &
    light \% (N)        & (-) 1.08**    &
    acceleration std (A)        & 0.27        &
    gyro z median (M) &  (+) 3.73* &
    gyro z histogram\_8 (M) & 0.95*
    \\

    &
    acceleration std (A)        & (+) 1.06**    &
    light \% (N)        & 0.26        &
    gyro z median (N) &  (+) 3.71** &
    gyro x ecdf\_\_perc\_0 (N) & 0.94*
    \\

    \arrayrulecolor{Gray}
    \cmidrule{2-9}

    %

    %

    \multirow{5}{1.9cm}{\textbf{Aggression Towards Animals}} &
    \textbf{sedentary \% (M)}        & \textbf{(+) 2.80*}    &
    \textbf{sedentary \% (M)}       & \textbf{0.69*}        &
    \textbf{acc y neighbourhood\_peaks (M)}        & \textbf{(+) 5.43*}  &
    \textbf{acc y neighbourhood\_peaks (M)}   & \textbf{1.35*}
    \\

    &
    sleep \% (M)        & (-) 2.61*    &
    sleep \% (M)        & 0.65*        &
    acc z neighbourhood\_peaks (M)  &  (+) 5.20* &
    acc z neighbourhood\_peaks (M) & 1.29*
    \\

    &
    acceleration mean (M)        & (+) 2.33*    &
    acceleration mean (M)        & 0.58*        &
    gyro y zero\_crossing\_rate (M) &  (+) 5.13* &
    gyro y zero\_crossing\_rate (M) & 1.27*
    \\

    &
    acceleration median (M)        & (+) 2.32*    &
    acceleration median (M)        & 0.58*        &
    gyro x neighbourhood\_peaks (M) &  (+) 5.06** &
    gyro x neighbourhood\_peaks (M) & 1.25*
    \\

    &
    acceleration median (N)        & (+) 2.32*    &
    acceleration median (N)       & 0.58*        &
    gyro x ecdf\_0 (M) &  (-) 4.99* &
    gyro z ecdf\_percentile\_count\_0 (M) & 1.24*
    \\

    \arrayrulecolor{black}
    \cmidrule{2-9}

      &
     \multicolumn{8}{c}{\cellcolor[HTML]{FFFFFF}\textbf{MCPQ-R}}
     \\

    \arrayrulecolor{black}
    \cmidrule{2-9}

    &
    &
    \textit{t-statistic} &
    &
    \textit{Cohen's-d} &
    &
    \textit{t-statistic} &
    &
    \textit{Cohen's-d}
    \\

    %

    %

    \multirow{5}{1.9cm}{\textbf{Extraversion}} &
    \textbf{acceleration min (M)}        & \textbf{(+) 2.34*}    &
    \textbf{acceleration min (M)}        & \textbf{0.60*}        &
    \textbf{gyro x histogram\_4 (N)} &  \textbf{(-) 4.86*} &
    \textbf{gyro x histogram\_4 (N)} & \textbf{1.24*}
    \\

    &
    acceleration max (A)           & (+) 2.19*    &
    acceleration max (A)    & 0.56*        &
    gyro x zero\_crossing\_rate (N) &  (-) 4.23* &
    gyro x zero\_crossing\_rate (N) & 1.08*
    \\

    &
    acceleration min (A)        & (+) 2.09*    &
    acceleration min (A)        & 0.54*        &
    acc y histogram\_8 (M) &  (-) 3.71* &
    acc y histogram\_1 (A) & 0.94*
    \\

    &
    acceleration min (N)        & (+) 1.96**    &
    acceleration min (N)    & 0.50*        &
    acc y histogram\_1 (A) &  (+) 3.68* &
    acc y histogram\_8 (M) & 0.92*
    \\

    &
    acceleration mean (N)        & (+) 1.95**    &
    acceleration mean (N)    & 0.50*        &
    gyro y auc (M) &  (-) 3.45* &
    gyro y auc (M) (N) & 0.86*
    \\

    \arrayrulecolor{Gray}
    \cmidrule{2-9}

    %

    %

    \multirow{5}{1.9cm}{\textbf{Motivation}} &
    \textbf{sedentary \% (M)}        & \textbf{(+) 3.22*}    &
    \textbf{sedentary \% (M)}        & \textbf{0.80*}        &
    \textbf{gyro z histogram\_7 (M)} &  \textbf{(-) 4.45*} &
    \textbf{gyro z histogram\_7 (M)} & \textbf{1.10*}
    \\

    &
    acceleration std (M)        & (-) 3.11*    &
    acceleration std (M)        & 0.76*        &
    gyro z histogram\_6 (M) &  (-) 4.25** &
    gyro z histogram\_6 (M) & 1.06*
    \\

    &
    sleep \% (A)        & (-) 2.58*    &
    acceleration min (M)        & 0.65*        &
    gyro z histogram\_9 (N) &  (-) 4.18** &
    gyro z median (M) & 1.05*
    \\

    &
    acceleration min (M)        & (+) 2.57*    &
    sleep \% (A)        & 0.64*        &
    gyro z median (M) &  (-) 4.18* &
    gyro z median (N) & 1.05*
    \\

    &
    sleep \% (M)        & (-) 2.40*    &
    sleep \% (M)        & 0.60*        &
    gyro z histogram\_7 (A) &  (-) 4.18* &
    gyro z median (A) & 1.04*
    \\

    \arrayrulecolor{Gray}
    \cmidrule{2-9}

    %

    %

    \multirow{5}{1.9cm}{\textbf{Training Focus}} &
    \textbf{light \% (A)}        & \textbf{(-) 1.88**}    &
    \textbf{light \% (A)}        & \textbf{0.46}        &
    \textbf{gyro x histogram\_4 (M)} &  \textbf{(+) 4.74*} &
     \textbf{gyro x histogram\_4 (M)} & \textbf{1.17*}
    \\

    &
    acceleration std (M)        & (-) 1.80**    &
    acceleration std (M)        & 0.44        &
    acc x histogram\_5 (M) &  (+) 4.71* &
    acc x histogram\_5 (M) & 1.17*
    \\

    &
    moderate-vigorous \% (M)        & (-) 1.69**    &
    moderate-vigorous \% (M)        & 0.41        &
    acc x mean (M) &  (+) 4.56* &
    acc x mean (M) & 1.12*
    \\

    &
    sedentary \% (A)        & (-) 1.59**    &
    sedentary \% (A)        & 0.40        &
    acc x median (M)        & (+) 3.98* &
    acc x median (M) & 0.98*
    \\

    &
    light \% (M)        & (-) 1.59**   &
    light \% (M)        & 0.39        &
    gyro y negative\_turning\_points (M) &  (+) 3.88* &
    gyro y negative\_turning\_points (M) & 0.96*
    \\

    \arrayrulecolor{Gray}
    \cmidrule{2-9}

    %

    %

    \multirow{5}{1.9cm}{\textbf{Amicability}} &
    \textbf{sleep \% (N)}        & \textbf{(-) 3.80*}    &
    \textbf{sleep \% (N)}        & \textbf{0.97*}        &
    \textbf{gyro y zero\_crossing\_rate (N)} &  \textbf{(-) 9.79*} &
    \textbf{gyro y zero\_crossing\_rate (N)} & \textbf{2.42*}
    \\

    &
    sleep \% (M)        & (-) 3.44*    &
    sleep \% (M)        & 0.87*        &
    gyro y zero\_crossing\_rate  (M) &  (-) 9.15* &
    gyro y zero\_crossing\_rate (M) & 2.30*
    \\

    &
    sedentary \% (M)        & (+) 3.29*    &
    light \% (M)        & 0.84*        &
    gyro y histogram\_4 (M) &  (-) 9.03* &
    gyro y histogram\_4 (M) & 2.22*
    \\

    &
    light \% (M)        & (+) 3.20*    &
    sedentary \% (M)        & 0.83*        &
    gyro y histogram\_4 (N) &  (-) 8.89* &
    gyro y histogram\_4 (N) & 2.21*
    \\

    &
    accleration min (M)        & (+) 3.17*    &
    accleration min (M)        & 0.83*        &
    gyro y histogram\_5 (M) &  (-) 7.82* &
    gyro y histogram\_5 (M) & 1.94*
    \\

    \arrayrulecolor{Gray}
    \cmidrule{2-9}

    %

    %

    \multirow{5}{1.9cm}{\textbf{Neuroticism}} &
    \textbf{acceleration std (M)}        & \textbf{(+) 3.02*}    &
    \textbf{acceleration std (M)}      & \textbf{0.75*}        &
    \textbf{gyro z histogram\_8 (N)} &  \textbf{(+) 6.19*} &
    \textbf{gyro z histogram\_8 (N)} & \textbf{1.53*}
    \\

    &
    moderate-vigorous \% (M)        & (+) 2.72*    &
    acceleration min (M)       & 0.67*        &
    gyro z histogram\_7 (N) &  (+) 5.80* &
    gyro z histogram\_7 (N) & 1.44*
    \\

    &
    acceleration min (M)        & (-) 2.69*    &
    moderate-vigorous \% (M)     & 0.67*        &
    gyro z histogram\_9 (N) &  (+) 5.78* &
    gyro z histogram\_9 (N) & 1.43*
    \\

    &
    acceleration max (A)        & (-) 2.49*    &
    acceleration max (A)     & 0.62*        &
    gyro z histogram\_9 (M) &  (+) 5.53* &
    gyro z histogram\_9 (M) & 1.37*
    \\

    &
    acceleration min (A)       & (-) 2.44*    &
    acceleration min \% (A)       & 0.61*        &
    gyro z ecdf\_percentile\_1 (M) &  (+) 5.43* &
    gyro z ecdf\_percentile\_1 (M) & 1.35*
    \\

    \arrayrulecolor{black}
    \hline

    \end{tabular}
    }
\end{table*}

\begin{table*}
    \caption{{Inference results for each personality trait in DPQ and MCPQ-R for different types of models:} Mean ($\bar{S}$) and Standard Deviation ($S_\sigma$) area under the receiver operating characteristic curve (AUC) computed from five iterations. Results are presented as $\bar{S} (S_\sigma)$, where $S$ is AUC score, and the highest performing model is marked in bold text. SVM: Support Vector Machines; L-GBM: Light Gradient Boosting Machine; NB: Naive Bayes; RF: Random Forest.}
    \label{tab:accuracies_model_types}
    \resizebox{\textwidth}{!}{%

    \begin{tabular}{c c c c c c}

    &
    \multicolumn{5}{c}{\cellcolor[HTML]{FFFFFF}\textbf{DPQ}}
     \\

    \arrayrulecolor{black}
    \cmidrule{2-6}

    &
    \multicolumn{1}{c}{\cellcolor[HTML]{FFFFFF}\textbf{Fearfulness}} &
    \multicolumn{1}{c}{\cellcolor[HTML]{FFFFFF}\textbf{Aggression Towards People}} &
    \multicolumn{1}{c}{\cellcolor[HTML]{FFFFFF}\textbf{Excitability}} &
    \multicolumn{1}{c}{\cellcolor[HTML]{FFFFFF}\textbf{Responsiveness to Training}} &
    \multicolumn{1}{c}{\cellcolor[HTML]{FFFFFF}\textbf{Aggression Towards Animals}}
    \\

    \arrayrulecolor{Gray}
    \hline

    \textbf{Baseline} &
    .50 (.00) &
    .50 (.00) &
    .50 (.00) &
    .50 (.00) &
    .50 (.00)
    \\

    \arrayrulecolor{Gray}
    \hline

    \textbf{SVM} &
    .71 (.02) &
    .66 (.05) &
    .59 (.03) &
    \textbf{.72 (.06)} &
    .63 (.09)
    \\

    \textbf{L-GBM} &
    .76 (.09) &
    \textbf{.68 (.06)} &
    .61 (.08) &
    .66 (.03) &
    .59 (.10)
    \\

    \textbf{NB} &
    .71 (.05) &
    .63 (.08) &
    \textbf{.62 (.02)} &
    .65 (.03) &
    .59 (.04)
    \\

    \textbf{RF} &
    \textbf{.78 (.07)} &
    .65 (.08) &
    .62 (.08) &
    .70 (.09f) &
    \textbf{.68 (.06)}
    \\

    \arrayrulecolor{Gray}
    \hline

    &
    \multicolumn{5}{c}{\cellcolor[HTML]{FFFFFF}\textbf{MCPQ-R}}
    \\

    \arrayrulecolor{black}
    \cmidrule{2-6}

    &
    \multicolumn{1}{c}{\cellcolor[HTML]{FFFFFF}\textbf{Extraversion}} &
    \multicolumn{1}{c}{\cellcolor[HTML]{FFFFFF}\textbf{Motivation}} &
    \multicolumn{1}{c}{\cellcolor[HTML]{FFFFFF}\textbf{Training Focus}} &
    \multicolumn{1}{c}{\cellcolor[HTML]{FFFFFF}\textbf{Amicability}} &
    \multicolumn{1}{c}{\cellcolor[HTML]{FFFFFF}\textbf{Neuroticism}}
    \\

    \arrayrulecolor{Gray}
    \hline

    \textbf{Baseline} &
    .50 (.00) &
    .50 (.00) &
    .50 (.00) &
    .50 (.00) &
    .50 (.00)
    \\

    \arrayrulecolor{Gray}
    \hline

    \textbf{SVM} &
    \textbf{.64 (.01)} &
    .70 (.02) &
    .73 (.06) &
    .67 (.03) &
    .62 (.09)
    \\

    \textbf{L-GBM} &
    .62 (.07) &
    .69 (.11) &
    .70 (.08) &
    .71 (.05) &
    .70 (.08)
    \\

    \textbf{NB} &
    .64 (.11) &
    .72 (.05) &
    .81 (.02) &
    .70 (.08) &
    .70 (.02)
    \\

    \textbf{RF} &
    .59 (.07) &
    \textbf{.76 (.07)} &
    \textbf{.89 (.13)} &
    \textbf{.74 (.08)} &
    \textbf{.73 (.11)}
    \\

    \arrayrulecolor{Gray}
    \hline

    \end{tabular}%
    }
\end{table*}

\begin{table*}
    \caption{{Random Forest inference results for each personality trait in DPQ and MCPQ-R for different types of features:} Mean ($\bar{S}$) and Standard Deviation ($S_\sigma$) Area Under the receiver operating characteristic Curve (AUC) computed from five iterations. Results are presented as $\bar{S} (S_\sigma)$, where $S$ is AUC, and the highest performing model is marked in bold text. ACT: activity level features; STAT: statistical features; DEM: dog demographic attributes including its sex, weight, age, training rating, and whether neutered; O-INFO: dog owner's sex and personality traits.}
    \label{tab:accuracies_feature_types}
    \resizebox{\textwidth}{!}{%

    \begin{tabular}{c c c c c c}

    &
    \multicolumn{5}{c}{\cellcolor[HTML]{FFFFFF}\textbf{DPQ}}
    \\

    \cmidrule{2-6}

    &
    \multicolumn{1}{c}{\cellcolor[HTML]{FFFFFF}\textbf{Fearfulness}} &
    \multicolumn{1}{c}{\cellcolor[HTML]{FFFFFF}\textbf{Aggression Towards People}} &
    \multicolumn{1}{c}{\cellcolor[HTML]{FFFFFF}\textbf{Excitability}} &
    \multicolumn{1}{c}{\cellcolor[HTML]{FFFFFF}\textbf{Responsiveness to Training}} &
    \multicolumn{1}{c}{\cellcolor[HTML]{FFFFFF}\textbf{Aggression Towards Animals}}
    \\

    \arrayrulecolor{Gray}
    \hline

    \textbf{B1} &
    .50 (.00) &
    .50 (.00) &
    .50 (.00) &
    .50 (.00) &
    .50 (.00)
    \\

    \textbf{B2: O-INFO} &
    .54 (.10) &
    .48 (.15) &
    .40 (.18) &
    .52 (.11) &
    .49 (.09)
    \\

    \textbf{B3: DEM} &
    .57 (.08) &
    .49 (.06) &
    .48 (.08) &
    .55 (.07) &
    .50 (.12)
    \\

    \arrayrulecolor{Gray}
    \hline

    \textbf{G1: ACT} &
    .67 (.05) &
    .47 (.02) &
    .60 (.06) &
    .53 (.08) &
    .56 (.05)
    \\

    \textbf{G2: STAT} &
    .55 (.05) &
    .47 (.13) &
    .25 (.09) &
    .58 (.07) &
    .53 (.04)
    \\

    \textbf{G3: ACT+DEM} &
    \textbf{.80 (.11)} &
    .63 (.13) &
    .47 (.12) &
    .61 (.15) &
    .67 (.05)
    \\

    \textbf{G4: STAT+DEM} &
    .63 (.08) &
    .57 (.11) &
    .33 (.11) &
    \textbf{.70 (.04)} &
    .59 (.04)
    \\

    \textbf{G5: ACT+STAT} &
    .78 (.07) &
    .65 (.08) &
    \textbf{.62 (.08)} &
    .70 (.09) &
    \textbf{.68 (.06)}
    \\

    \textbf{G6: ACT+STAT+DEM} &
    .61 (.03) &
    \textbf{.65 (.04)} &
    .51 (.09) &
    .61 (.09) &
    .51 (.06)
    \\

    \hline

    &
    \multicolumn{5}{c}{\cellcolor[HTML]{FFFFFF}\textbf{MCPQ-R}}
    \\

    \arrayrulecolor{black}
    \cmidrule{2-6}

    &
    \multicolumn{1}{c}{\cellcolor[HTML]{FFFFFF}\textbf{Extraversion}} &
    \multicolumn{1}{c}{\cellcolor[HTML]{FFFFFF}\textbf{Motivation}} &
    \multicolumn{1}{c}{\cellcolor[HTML]{FFFFFF}\textbf{Training Focus}} &
    \multicolumn{1}{c}{\cellcolor[HTML]{FFFFFF}\textbf{Amicability}} &
    \multicolumn{1}{c}{\cellcolor[HTML]{FFFFFF}\textbf{Neuroticism}}
    \\

    \arrayrulecolor{Gray}
    \hline

    \textbf{B1} &
    .50 (.00) &
    .50 (.00) &
    .50 (.00) &
    .50 (.00) &
    .50 (.00)
    \\

    \textbf{B2: O-INFO} &
    .43 (.02) &
    .52 (.04) &
    .56 (.03) &
    .47 (.10) &
    .51 (.11)
    \\

    \textbf{B3: DEM} &
    .44 (.05) &
    .54 (.08) &
    .56 (.04) &
    .49 (.09) &
    .52 (.10)
    \\

    \arrayrulecolor{Gray}
    \hline

    \textbf{G1: ACT} &
    .41 (.03) &
    .63 (.06) &
    .47 (.06) &
    .41 (.04) &
    .57 (.02)
    \\

    \textbf{G2: STAT} &
    .64 (.06) &
    .36 (.11) &
    .34 (.04) &
    .71 (.05) &
    .69 (.09)
    \\

    \textbf{G3: ACT+DEM}  &
    .40 (.09) &
    \textbf{.77 (.09)} &
    \textbf{.89 (.08)} &
    .38 (.07) &
    .47 (.02)
    \\

    \textbf{G4: STAT+DEM} &
    \textbf{.63 (.04)} &
    .33 (.08) &
    .43 (.06) &
    .70 (.08) &
    .67 (.09)
    \\

    \textbf{G5: ACT+STAT} &
    .59 (.07) &
    .76 (.07) &
    .89 (.13) &
    \textbf{.74 (.08)} &
    \textbf{.73 (.11)}
    \\

    \textbf{G6: ACT+STAT+DEM} &
    .62 (.04) &
    .33 (.08) &
    .43 (.07) &
    .63 (.06) &
    .70 (.09)
    \\

    \arrayrulecolor{Gray}
    \hline

    \end{tabular}%
    }
\end{table*}

\subsection{Activity Level and Statistical Features Discriminating Dog Personality}\label{subsec:statistical_analysis}
The statistical features showed high $t$-statistic, low $p$-values, and high Cohen's-$d$ values for a majority of dog personality traits on both questionnaires (Table~\ref{tab:tstatistics}). Most of these features were derived from gyroscope, and were captured during the morning. The activity-level features also showed high Cohen's-d values, but not as high as the statistical ones.

\begin{itemize}[leftmargin=*,align=left]
\item DPQ: For \emph{Fearfulness}, the percentage of time spent in sedentary activity in the afternoon had a Cohen's-d of 0.88, and the amount time of time spent doing light activity at night had a Cohen's-d of 0.78; both of which have a large effect size. This translates into saying that a dog's sedentary activity in the afternoon or light activity at night are both informative of high vs. low levels of fearfulness.
These were in fact the highest Cohen's-d obtained for any activity-level features. In general, the lowest Cohen's-d values came for \emph{Aggression Towards People}. For that trait, light activity percentage at night, morning, and afternoon had Cohen's-d of 0.17, 0.43, and 0.32, respectively, while moderate-vigorous activity level during night had a Cohen's-d of 0.27. These features had above small effect size with low reliability (because the 95\% confidence interval was crossing zero in many cases), thus no association could have been drawn.

\item MCPQ-R: Across all traits, the statistical features had comparably similar values for $t$-statistic and Cohen's-$d$ to those previously obtained by DPQ. However, activity-level features had Cohen's-d for MCPQ-R higher compared to those for DPQ, showing a better discriminative capability of high class vs. low class for MCPQ-R traits compared to DPQ traits. In particular, statistical features capturing acceleration (i.e., dog movements throughout the day) had Cohen's-d values above 0.5, suggesting a link between Extraversion and high levels of activity; a finding in line with previous work~\cite{carrier2013exploring}.

\end{itemize}

These results suggest that both activity levels and the statistical features have discriminative power to various degrees, allowing us to draw conclusions on which features are associated with dog personality (\textbf{RQ\textsubscript{2}}).

\begin{figure*}
\captionsetup{labelfont=normalfont}
\centerline{\includegraphics[width=0.99\linewidth]{figures/dpq_nma_results_v6.png}}
\caption{{Area Under the receiver operating characteristic Curve (AUC) score comparison for DPQ traits with models that used features from:} night (N); morning (M); afternoon (A); and all time periods (N+M+A). Feature type combinations (G1-G6 from Table~\ref{tab:accuracies_feature_types}) that provided the AUC score is marked in white color at the bottom of each bar.}

\label{fig:nma_dpq_results}
\end{figure*}

\begin{figure*}
\captionsetup{labelfont=normalfont}
\centerline{\includegraphics[width=0.99\linewidth]{figures/mcpqr_nma_results_v6.png}}
\caption{{Area Under the receiver operating characteristic Curve (AUC) score comparison for MCPQ-R traits with models that used features from:} night (N); morning (M); afternoon (A); and all time periods (N+M+A). Feature type combinations (=G1-G6 from Table~\ref{tab:accuracies_feature_types}) that provided the AUC score is marked in white color at the bottom of each bar.}
\label{fig:nma_mcpqr_results}
\end{figure*}

\subsection{Predicting Dog Personality}
Table~\ref{tab:accuracies_model_types} shows the classification results for four model types predicting dog personality from both activity levels and statistical features. The columns show the performance for each personality trait, while the rows show model types. The baseline for all experiments is 0.5 as the testing sets were balanced~\cite{meegahapola2022sensing}. For DPQ, the best AUCs were obtained with Random Forest (in the range of 0.62-0.80), so for MCPQ-R (in the range of 0.63-0.89). AUC was highest for \emph{Training Focus} with a score of 0.89 using Random Forest, and lowest for \emph{Excitability} with a score of 0.59 using SVM. In general, the AUC scores of DPQ questionnaire were lower compared to those of MCPQ-R, meaning that our sensed features are better at classifying MCPQ-R traits (in line with the results in Section~\ref{subsec:statistical_analysis}). Given that Random Forest models showed the best performance for the majority of inferences, for brevity, we only present that model's results in the remainder of this section.

Table~\ref{tab:accuracies_feature_types} shows the performance for various feature type combinations, and two additional baseline models using: \emph{a)} dog owner's sex and personality (B2: O-INFO), and \emph{b)} dog demographics (i.e., sex, weight, age, training rating, and whether neutered) (B3: DEM). Models that used activity-level features alone performed with AUC scores in the range of 0.47-0.67 for DPQ, and 0.41-0.63 for MCPQ-R. Statistical features performed worse than activity-level features with AUC scores in the range of 0.25-0.58 for DPQ, and 0.34-0.71 for MCPQ-R. This suggests that, while being more interpretable, activity-level features offer higher predictive accuracies. When adding dog demographics to the models, their performance increased by considerable margins. The best performance for most dog personality traits was obtained when either one or both sensed feature types (activity-level and statistical features) were combined with demographic features. Overall, DPQ traits had AUC scores in the range of 0.62-0.80, with two traits above 0.70, while MCPQ-R traits had scores in the range of 0.63-0.89, with four traits having scores above 0.70. These results show that a combination of sensed features is predictive of dog personality traits with reasonable AUC scores above 0.70.

When the same features were computed at different times of day, they contributed differently to the predictive power. Figure~\ref{fig:nma_dpq_results} (DPQ) and Figure~\ref{fig:nma_mcpqr_results} (MCPQ-R) show varying performances for different time period-specific models (night, morning, or afternoon) compared to generic models that used the features computed throughout the whole day. For DPQ, models that used morning features were the best for predicting \emph{Fearfulness} and \emph{Excitability}, afternoon features were the best for \emph{Responsiveness to Training} and \emph{Aggressiveness Towards Animals}, and finally, night features were the best for \emph{Aggressiveness Towards People}. For MCPQ-R, models that used period-specific features did not yield better results---with the exception of \emph{Motivation} that yielded an AUC of 0.90 with night features. These results suggest that it would be better to use period-specific models for DPQ, and generic models for MCPQ-R.

Overall, these results suggest that a specific combination of features works best (i.e., using activity levels, statistical features, and demographics together), that the same feature computed at different times of day contributes differently to prediction power, yielding higher accuracy when predicting DPQ traits (\textbf{RQ\textsubscript{3}}).

\begin{figure*}
\captionsetup{labelfont=normalfont}
\centerline{\includegraphics[width=0.9\linewidth]{figures/owner_ratings_2x_v3.png}}
\caption{Response distribution from dog owners about features they would like to see in future dog wearables. Most of them mentioned measurements of aspects that are hard to quantify (e.g., psychological and behavioral states as proxies to a dog's health, feelings, mood, stress, and personality).}
\label{fig:owner_responses}
\end{figure*}

\subsection{\textbf{Follow-up Survey with Dog Owners}}\label{subsec:qualitative_analysis}
Dog owners answered a series of open-ended questions (in a free-text form) about the usability of Patchkeeper and a series of Likert-scale questions about the desirability of features in future dog monitoring wearables (Figure~\ref{fig:owner_responses}). We structured their responses into two sections: \emph{Usability of PatchKeeper} and \emph{Future dog monitoring wearables.} As a convention, for dog owners' quotes, we use the letter \textbf{P} (indicating a human participant) followed by the dog ID from Table~\ref{tab:participants} (e.g., \textbf{P1} is the owner of Dog\#1).

\noindent \paragraph{Usability of the PatchKeeper device.} A majority of dog owners had a good experience using the device. \textbf{P5} mentioned that \emph{`` it [PatchKeeper] was easy to use and charge''}, and \textbf{P7} stated that  \emph{``dog didn't mind wearing it''}. While the device was overall easy to use, owners had mixed feelings about its battery life. One said that \emph{``battery life is too short [...] charging it every day was a hassle''} (\textbf{P9}), while another stated that \textit{``battery lasted a full day without an issue''} (\textbf{P2}).
The split opinions about battery life, however, are very subjective and might be driven by
the charging patterns of other owner's devices. For example, for a person who uses a smartwatch (e.g., Apple or Samsung Galaxy watches) that needs to be charged daily, the Patchkeeper's battery life might seem fair. However, for people who are accustomed to devices with longer battery lives (e.g.,  AmazFit, Fitbit or Garmin), PatchKeeper's battery life would be perceived to be much shorter. In terms of developing tools for dog monitoring, owners provided a range of answers, including health monitoring and understanding their pet better. For health monitoring, \textbf{P12} mentioned that \emph{``such devices can be useful to catch dog problems early [...] like maybe breathing too fast constantly, or cardiac problems''}. For understanding their pet better, \textbf{P3} put it nicely that \textit{``as dogs cannot speak [...] a device that allows my dog to `speak' and `express her feelings' is worth everything''}.

\noindent \paragraph{Future dog monitoring wearables.} Dog owners expressed their opinion about a set of features for future dog wearable devices. They provided answers on a Likert scale of 1 to 7 (1 – strongly not preferred; 3 – not preferred; 5 – preferred; 7 – strongly preferred), and their responses are summarized in Figure~\ref{fig:owner_responses}. Most dog owners (66.67\%) strongly preferred features that would allow them to monitor their dog's health. The second most desirable feature was to understand how dogs feel when they meet other dogs. Moreover, even though it was sixth in terms of the mean score, 58.33\% of dog owners (7 out of 12) gave a rating of seven out of seven for a feature that measured the personality of their dogs. This shows that dog owners were polarized regarding knowing dog personality. Another feature that received a very high rating was the ability of a wearable to track the mood and stress of dogs. In fact, most of the preferred features were about measures that are hard to quantify (e.g., psychological and behavioral states as proxies for a dog's health, feelings, mood, stress, and personality).
\section{Introduction}
\label{sec:introduction}
When it comes to dog adoption, breed may not be the only important factor to consider~\cite{bradshaw2021impact, personality_over_breed} as humans tend to favor, for example, a pet's looks (e.g., attractiveness~\cite{chersini2018dog} based on poses and facial areas~\cite{isgate2018makes, hecht2015seeing}) and perceived human-directed sociability~\cite{lamb2021role}. However, according to a study from the Animal Farm Foundation~\cite{animal_foundation}, one in every four pets that are chosen based on breed (or looks) end up in shelters and rescues. By contrast, personality traits tend to offer a more comprehensive behavioral description of a dog, which is consistent over time and context~\cite{gartner2015pet}. Dog personality has been described in the literature using a variety of traits including fearfulness, energy levels, aggression, excitability, motivation, and amicability~\cite{jones2005temperament, jones2008development, ley2008personality}.

Not only could dog personality assessment reduce the number of owner-dog mismatches, but it could also put an end to (unfortunate) cases in which dogs get flocked into shelters or destroyed by authorities when expelled from their homes~\cite{corsetti2021different}. In fact, a few dog agencies and shelters are already experimenting with the use of dog personality traits for matchmaking dogs with future owners~\cite{nhhumane2022, knowsley2021meet}. Further, like humans, dogs also need different levels and types of companionship, activities, and emotional connection depending on their inherent personality traits~\cite{burgesspetcare2021tailor, knowsley2021meet}. It is therefore extremely important to identify a set of activities that `work' for a dog, and to find the right companion dogs for socializing~\cite{caroline2022do}, not least because inadequate socialization may escalate the pet's fear levels and may lead to aggression~\cite{shibashake2017do}.

Dog personality assessment is typically done through observational assessments by experts or psychological scales administered to the dog's owner \cite{cox2020understanding, jones2008development}. The former is expensive, time-consuming, and requires highly specialized facilities, and the latter is time-consuming, is prone to biases, and requires knowledge of someone who already knows the dog very well~\cite{jones2005temperament, jones2008development, rowan1992shelters}. That is why we set out to computationally assess dog personality in everyday settings (compared to highly specialized facilities or laboratory settings) with wearables. In the wearable sensing literature, studies used devices for monitoring dog activity~\cite{weiss2013wagtag, ladha2013dog, chambers2021deep, byrne2018predicting, ladha2013dog}, detecting pruritic behaviors (i.e., scratching, head  shaking)~\cite{griffies2018wearable}, and tracking breathing patterns~\cite{cotur2022bioinspired}. This stream of research recently inspired the fast-growing market of pet wearables~\cite{zamansky2019log} with a number of consumer-grade platforms readily available such as FitBark\footnote{\url{https://www.fitbark.com/}} (location, activity, and sleep tracking), PetPace\footnote{\url{https://petpace.com/}} (vital signs and behavior tracking), and PitPat\footnote{\url{https://www.pitpat.com/}} (activity tracking with gamified social elements).

Similar to how passive sensing of human personality drives the design of personalized apps~\cite{khwaja2019modeling}, sensor-based modeling of dog behavior through activity trackers has the potential to benefit both dogs and owners~\cite{zamansky2019log}. It has been found to impact owners' motivation to increase their mutual physical activities with their dogs, and increased human awareness to animals' needs \cite{jones2014use}.
However, computational personality assessment techniques for dogs are non-existent. Therefore, we set out to develop and test an automatic way of operationalizing dog personality through passively sensed data from wearables. In so doing, we made three sets of contributions:

\begin{itemize}[leftmargin=*,align=left]
    \item We developed a wearable device, called ``Patchkeeper'', which can be easily strapped on a dog's chest (Section~\ref{sec:patchkeeper}). The device is equipped with accelerometer and gyroscope sensors. Since its processing pipeline was initially developed for wearable data  obtained from human subjects, we conducted a validation study of our device and the pipeline on dogs, together with a consumer-grade dog activity monitor. We found that our device is capable of determining four activity levels: moderate-vigorous activity with an accuracy of 92\%; light and sedentary activity with an accuracy of 96\%; and sleep with an accuracy of 98\%.
    \item We launched a data collection campaign to recruit dog owners whose pets participated in a one-week study. The campaign was launched on four social media platforms (i.e., posts were made on Twitter, Facebook, Instagram, and NextDoor) and was also spread via word of mouth (Section~\ref{sec:animal_study}), resulting in a total of 22 dogs being successfully recruited and monitored for one week (i.e., the entire period of study).
    Dog owners answered two validated questionnaires (the Dog Personality Questionnaire (DPQ)~\cite{jones2008development} and the Refined Monash Canine Personality Questionnaire (MCPQ-R)~\cite{ley2009refinement}), and provided self-reports about their dog's activities (e.g., images were taken when walking the dog). Using the passively sensed data, we developed a data processing pipeline and extracted two types of features: (a) activity-level features (e.g., \% of sleep in the morning,  \% of sedentary activity in the afternoon) and (b) statistical features (e.g., acceleration histogram) (Section~\ref{sec:dataset}). We statistically analyzed the extracted features along with the self-reports from the two questionnaires and found that both types of features could discriminate dog personality traits (e.g., high or low fearfulness), with features capturing dog activity between 6am and 12pm (morning) being more informative for personality trait inferences than features capturing activity in the rest of the day.
    This is expected as most dogs will be the most active and full of energy in the mornings after a dedicated sleep, and that was reflected in the signal captured from our device's sensors.
    \item We set up an inference task to predict dog personality traits using both activity-level and statistical features (Section~\ref{sec:statistical_analysis}). Our models achieved AUC scores in the range of 0.63-0.90 with a time-window-based setup (i.e., using the same features computed at different times of the day) (Section~\ref{sec:inference}). Interestingly, statistical features (e.g., acceleration histogram) were more informative than activity-level features (e.g., sedentary); yet, despite explaining more variance in personality traits, the former set of features is less interpretable than the latter one, opening up the need for Explainable AI in this kind of wearables too. When it comes to the usability of dog monitoring wearables, dog owners had split opinions about battery life (some found a day of battery life to be sufficient, while others expressed the opposite). For the development of future monitoring wearables, the majority of dog owners stressed their immense value, echoing a dog owner's statement: ``as dogs cannot speak, a device that allows my dog to `speak' and `express her feelings' is worth everything''.
\end{itemize}{}
\section{Conclusion}
\label{sec:conclusion}

We built a device called ``Patchkeeper'' that can be strapped on a dog's chest and that measures its activity through an accelerometer and a gyroscope. We experimented with the device on 12 dogs and collected sensor activity data for a week, along with dog personality test results. By matching these two datasets, we trained machine learning classifiers that predicted dog personality from activity data. We found that a combination of activity-level features (describing the activity as sleeping, sedentary, light, or moderate-vigorous) and statistical features (describing temporal and statistical aspects of the time-series accelerometer and gyroscope data) extracted from sensor data, together with dog demographics worked the best. We also found that the same feature computed at different times of day contributed differently to prediction power, with morning features being predictive of fearfulness and excitability, afternoon features being predictive of responsiveness to training and aggressiveness towards animals, and night features being predictive of aggressiveness towards people and motivation.

\section{Discussion}
\label{sec:discussion}

\subsection{Summary of the Results}
In summary, our results showed that features captured from the inertial measurement unit along with dog demographic features are predictive of dog personality traits with reasonable AUC scores in the range of 0.62-0.89 (Table~\ref{tab:accuracies_feature_types}) in leave-K-dogs-out setting, with K = 4 (around 33\% of data was used for testing). In addition, as shown in Table~\ref{tab:accuracies_model_types}, we found that random forest classifiers performed best for the majority of inferences. However, results in Figure~\ref{fig:nma_dpq_results} and Figure~\ref{fig:nma_mcpqr_results} showed that, by using separate models for a particular time of day (i.e., night, morning, or afternoon), and by using different feature groups for each model (i.e., different combinations of activity level, statistical, and demographic features), led to increased performance. In particular, we observed an increased performance across all five personality traits under DPQ (AUC scores of 0.89 for \emph{Fearfulness}; 0.75 for \emph{Aggression towards People}; 0.65 for \emph{Excitability}; 0.78 for \emph{Responsiveness to Training}; and 0.75 for \emph{Aggression towards Animals}), while the performance gains for MCPQ-R (AUC scores of 0.63 for \emph{Extraversion}; 0.90 for \emph{Motivation}; 0.89 for \emph{Training Focus}; 0.74 for \emph{Amicability}; and 0.73 for \emph{Neuroticism}) was only visible for one personality trait, that is, Motivation. This highlights that capturing data from a certain period of the day provides better predictive power for certain personality traits, while for other traits, using all available features was a better option.

\subsection{Implications}
Our work has both theoretical and practical implications. From a theoretical standpoint, our work adds empirical evidence to the growing body of research on animal personality~\cite{gosling2008personality}. We corroborated the previous findings suggesting that more extraverted dogs are associated with higher levels of activity (measured through our device's accelerometer sensor)~\cite{carrier2013exploring}, while amicable dogs engage in light activity (as previous work found~\cite{carrier2013exploring}). When it comes to aggression towards other animals, we found a moderate association with light activity. While previous work associated aggression with higher activity levels, they did so by studying Siberian Husky dogs~\cite{wan2013drd}; a breed not well represented in our sample. Our models also showed high performance for inferring fearfulness. Even though activity levels and fearfulness were not directly linked in previous literature, a possible explanation could be attributed to the relationship between activity levels and negative emotions (or stress), and negative emotions and stress have been associated with fearfulness~\cite{beaudet1994predictive, rayment2015applied, jones2014use}.
Overall, these results corroborate previous findings in the literature. At the same time, our study provides a fine-grained empirical analysis of the relationship between personality traits and activity levels, extending our theoretical understanding. Beyond animal personality research, our work contributes to the Animal-Computer Interaction literature, including recruitment techniques for in-the-wild studies and the use of pre-trained models for animal activity monitoring. In this work, we argue that dog monitoring could go beyond the typical activity level recognition to capture hard-to-quantify psychological aspects such as dog personality. Turning into our data processing pipeline, we showed that state-of-the-art wearable processing pipelines tailored to humans transferred, to a great extent, to our animal study. In a way, this might seem obvious because accelerometer data capture motion. However, only when data from dogs were properly scaled and processed (using a 1G scale) the pipeline and the inferred activities started to work (\S\ref{subsec:activity-level}). This finding holds great promise for future research in dog activity recognition. As for recruitment techniques, it was evident that dog recruitment required the element of trust. Word of mouth and recruiting in physical proximity through NextDoor turned out to be the best technique. Traditional techniques such as mailing lists, distributing leaflets, and posting on social media (Twitter, Facebook, Instagram) worked to a lesser extent. Another challenge was to retain participants. Given the battery life of 24 hours (even though it is similar to consumer-grade wearables such as Apple Watches\footnote{around 18 hours of battery: \href{https://www.apple.com/uk/apple-watch-series-7/}{https://www.apple.com/uk/apple-watch-series-7/}}), dog owners found it time-consuming and cumbersome to charge the device daily.

From a practical perspective, our findings speak to both dog owners and shelters. A practical application would be a `dog health app' that tracks a dog's behavior patterns over time and detects its personality or psychological aspects, such as the pet's valence, arousal, and stress levels. Such an app could increase dog owners' awareness of their pet's health and allow them to take proactive actions (e.g., walk the pet to reduce its stress levels). In addition to dog health monitoring, our work can be used for dog socializing. Future platforms could offer owners the ability to receive personalized recommendations for their pets. For example, an owner could subscribe to a service wherein tailored pet social activities are recommended, or their pet is matched with another `like-minded' pet. Similar to how dating apps allow like-minded individuals to match, such a platform could offer the same experiences for a dog-dog social matching. Finally, dog shelters could benefit by developing platforms for matching dogs with prospective owners. Currently, matching dogs to owners based on personality is difficult for both small and large shelters because of the sheer amount of effort needed to characterize dog personality. On the one hand, using experts to do personality assessments needs specialized facilities and money. On the other hand, psychological scales are time-consuming, prone to biases, and require someone who knows the dog very well. In contrast, letting dogs wear a device like Patchkeeper for a week (or a few days) and obtaining a data-driven personality assessment could be immensely useful.

\subsection{Limitations and Future Work}
Our work has several limitations that call for future research. First, we modeled dog personality by considering time-level (i.e., features were extracted by considering the signal for three time periods: night, morning, afternoon) and day-level (i.e., features were extracted by combining the signal of the three time periods) data. This allowed us to obtain several data points of the same dog on different days. In this way, we ensured robustness but also increased the relatively small (N=12 dogs) dataset size for inferences (up to 72 dog days). Second, while we obtained reasonable results with a small sample size, future studies could replicate our methodology with larger sample sizes. However, it is also worth noting that recruiting pet dogs for an in-the-wild study that runs for several days is challenging, and previous work had to resort to similar/lower sample sizes~\cite{hirskyj2021forming, weiss2013wagtag, ladha2013dog}. Additionally, while we enforced the same time schedule for the data collection to obtain comparable results, we acknowledge that different dogs might have different routines. Dogs with similar psychological readings (i.e., personality), but different routines might end up with different physiological readings (i.e., activity levels). Thus future studies could account for dog routines.

Our findings are based on the assumption that dog activity levels serve as a good proxy for activity types. Given that the range of activity types in dogs is narrower (e.g., walking, eating, sleeping, running~\cite{hussain2022activity}) compared to that of humans, that was a reasonable assumption. While we prompted dog owners to share activity-type labels with supporting pictures and videos with us (e.g., eating, drinking, running, playing), not all owners were compliant, preventing any further analysis. Future studies could attempt to disentangle dog activity types from dog activity levels by building upon our results.
Third, while we resorted to previous literature to control for factors that might have influenced our results (e.g., dog demographics such as sex, age, and neutering~\cite{kubinyi2009dog,lofgren2014management}), future studies may well incorporate additional factors such as the size of the dog's living environment, or even the presence of other pets in that environment. Fourth, all the dogs in the study, are from the same city in the United Kingdom. Thus, whether these results replicate in other cities or countries remains a subject of future work, specially given that the generalization of mobile sensing-based models across countries is an important topic of interest \cite{meegahapola2023generalization, meegahapola2021smartphone}. Fifth, data collection occurred during the summer period and might not be generalizable. Therefore, future studies could explore whether our findings generalize to other seasons (i.e., winter, fall, spring), when dog behaviors vary (especially in countries closer to hemispheres, where weather drastically changes in different seasons\footnote{\url{https://www.pdsa.org.uk/pet-help-and-advice/pet-health-hub/conditions/seasons-in-dogs}}). Sixth, capturing personality could be done in many ways, and, in this study, we only focused on two commonly used personality measurement questionnaires that are filled by dog owners, which were specifically designed for shelter rehoming. Future work should evaluate these scales in the context of other facilities in the USA, and could also explore other dog personality measurement techniques (i.e., test batteries, experts).

\section{Background and Related Work}\label{sec:related_work}

Next, we surveyed various lines of research that our work draws upon, and grouped them into four main areas: \emph{i)} dog personality research; \emph{ii)} psychological scales for assessing dog personality; \emph{iii)} monitoring dog activity with wearable sensing; and \emph{iv)} activity levels and dog personality.

\subsection{Dog Personality Research}\label{subsec:dog_personality_research}
Dogs have personality~\cite{jones2008development,ley2009refinement,ley2008personality}, which refers to a set of dog behaviors and traits that are consistent over time and context~\cite{gartner2015pet, gosling2008personality}. These traits stem from the Five-Factor Model of personality, a.k.a. the Big-Five Traits~\cite{costa1992four}. As with personality, temperament is also being used in literature to describe both human and animal behavior. Researchers on animals and human infants tend to use the term temperament, while those studying human children and adults tend to use the term personality, with the two terms often being used interchangeably~\cite{mccrae2000nature}. On the one hand, temperament has been defined as the inherited, early appearing tendencies that continue throughout life and serve as the foundation for personality~\cite{goldsmith1987roundtable, jones2005temperament}; a definition that has not been widely adopted by animal researchers~\cite{gosling2001mice}. On the other hand, personality psychologists often study phenomena including temperament and character traits, attitudes, physical and bodily states, moods, and life stories~\cite{john2000personality}. Therefore, a broad definition includes characteristics of individuals
that describe and account for consistent patterns of feeling, thinking, and behaving~\cite{pervin1997}. As the distinction between temperament and personality has not been maintained consistently in the literature, we echo the statement by Jones and Gosling \cite{jones2005temperament, jones2008development}, that is, \emph{the term ``temperament'' is used whenever possible while the term ``personality'' is more appropriate when, for example, referring to work that explicitly discusses personality research. Hence, we use the term personality throughout the paper.}

In the scientific literature, Elliott Humphrey first hinted at the idea of dogs having personality in 1934~\cite{humphrey1934mental}. He described German Shepherd dogs with the traits of jealousy, apport, wildness-tameness, affection, initiative, attentiveness, curiosity, alertness, fighting and protection instincts, willingness to bite humans, confidence, self-right, energy, willingness, and intelligence. Seventy years later, by reviewing more than 50 scientific articles on dog personality, Jones and Gosling~\cite{jones2005temperament} found several inconsistencies, and proposed the first five-factor dog personality instrument, covering the dimensions of reactivity, fearfulness, responsiveness to training, submissiveness, and aggression. Building on Jones and Gosling's seminal work, researchers have incrementally added other dimensions such as calmness, boldness, trainability, and sociability~\cite{kubinyi2009dog}; extraversion, neuroticism, self-assuredness (motivation), training focus, and amicability~\cite{ley2009refinement}; stranger-directed sociability, activity, aggressiveness, and trainability~\cite{mirko2012preliminary}; and playfulness, chase-proneness, curiosity/fearlessness, sociability, and aggressiveness~\cite{svartberg2006breed}.
Researchers, however, have split views when it comes to predictors of dog personality. Some studies found that different breeds have similar personalities~\cite{ley2009refinement, schneider2013temperament, svartberg2006breed}, while others reported the lack of evidence for it~\cite{mirko2012preliminary, sinn2010personality}. Two other attributes linked to personality traits are whether the dog is neutered or not (neutering is a surgical procedure to prevent a dog from reproducing) and its sex. Kubinyi et al.~\cite{kubinyi2009dog} found that not neutered dogs are more calm, while Lofgren et al.~\cite{lofgren2014management} found that neutered female dogs were less excitable and sought lower levels of attention. There is also evidence that older dogs are more calm~\cite{kubinyi2009dog} with lower amounts of fear~\cite{lofgren2014management} compared to their younger counterparts. Hence, as mentioned above, even though not conclusive, there is evidence that static attributes such as sex, age, and neutering could be associated with dog personality~\cite{kubinyi2009dog,lofgren2014management}.

\subsection{Psychological Scales for Assessing Dog Personality}\label{subsec:psychological_scale_dog_personality}

While there are many dog personality measurement questionnaires~\cite{ani11051234, posluns2017comparing}, two widely established and validated psychological scales are: \emph{a)} the Dog Personality Questionnaire (DPQ)~\cite{jones2008development}, and \emph{b)} the Refined Monash Canine Personality Questionnaire (MCPQ-R)~\cite{ley2009refinement}. Next, we explain each scale.

\begin{itemize}[leftmargin=*,align=left]
    \item \textbf{DPQ:} Building on the work of Jones and Gosling~\cite{jones2005temperament}, the development of this scale aimed at reducing the time and resources (i.e., trained assessors, money, facilities) for dog personality assessment. Amanda Jones started from 1200 dog descriptors (i.e., statements describing dog behavior) identified in the literature and narrowed them down to 360 statements~\cite{jones2008development}. Then, in two studies with over 6000 participants, they narrowed these statements down to 75 items, grouped in five factors of \emph{Fearfulness}, \emph{Aggression towards People}, \emph{Excitability}, \emph{Responsiveness to Training}, and \emph{Aggression towards Animals}.
    Scores for these traits can be derived using a list of statements marked by the dog owner on a Likert scale from 1 to 7 (1: disagree strongly; 7: agree strongly).
    \item \textbf{MCPQ-R:} This is the refined version of the original MCPQ questionnaire~\cite{ley2008personality}. The original questionnaire was developed using an adjective-based technique similar to the Big-Five Model of personality~\cite{john1990big}. Ley et al. \cite{ley2009refinement} revised the original MCPQ in a study with more than 450 participants. This led to the development of MCPQ-R, which consists of five factors: \emph{Extraversion} (perceived energy level of the dog), \emph{Motivation} (perceived persistence in the face of distractions---e.g., begging for food, finding a particular toy), \emph{Training Focus} (perceived trainability of the dog), \emph{Amicability} (perceived tolerance of the dog while being around humans and animals), and \emph{Neuroticism} (perceived nervous or cautious behavior of the dog). To assess these traits, dog owners rate 26 words (e.g., friendly, obedient, hyperactive) that describe their dog's personality by marking each word with the appropriate number from 1 to 6 (1 = really does not describe my dog; 6 = really describes my dog).
\end{itemize}

Even though the two scales come with different constructs, a fair amount of convergence has been observed~\cite{posluns2017comparing} between neuroticism (MCPQ-R) and fearfulness (DPQ); excitability (DPQ) and extraversion (MCPQ-R); responsiveness to training (DPQ) and training focus (MCPQ-R). While other widely used questionnaires such as the Canine Behavioral Assessment and Research Questionnaire (C-BARQ)~\cite{hsu2003development} were developed, recent research suggested that it is not suitable for general research use because it was designed to identify specific dog behavioral problems~\cite{cox2020understanding}. Hence, in the current study, we focused on DPQ and MCPQ-R questionnaires that capture a total of ten personality traits (factors).

\subsection{Dog Monitoring with Wearable Sensing}
Dog tracking and activity detection have gained much popularity due to advancements in sensor technology~\cite{hussain2022activity}, which led to a number of commercial dog monitoring products (e.g., FitBark, PetPace, PitPat). However, tying wearable sensing to behavioral tests (like dog personality in our case) is just starting to gain traction. In Animal-Computer Interaction research, prior studies focused on systems that facilitate better communication and interaction between dogs and owners~\cite{hirskyj2021forming} as well as among dogs~\cite{hirskyj2019internet}. Personality and dog behavior were also studied as part of certain games such as the spin-the-bottle~\cite{cox2020understanding}, concluding that dogs' preferences for human involvement were likely attributed to subtle differences in personality traits or prior training experiences.

Brugarolas et al.~\cite{brugarolas2015wearable} developed a non-invasive wearable sensor system for measuring dogs' vital signs using electrocardiogram (ECG), photoplethysmogram (PPG), and inertial measurement units (IMU). In a longitudinal study of monitoring puppies' cardiac changes, Foster et al.~\cite{foster2020preliminary} developed machine learning models for predicting puppies' Behavior Checklist (BCL) scores (including changes in energy and smoothness of movement, vocalization, tongue flicking, use of coping strategies, body language, and
changes in responsiveness to the handler), achieving up to 90\% of accuracy. Weiss et al.~\cite{weiss2013wagtag} developed WagTag that infers three dog activity levels (i.e., walk, run, and minimal), and concluded that personal models for predicting activity levels are better than universal models. Ladha et al.~\cite{ladha2013dog} also demonstrated that 17 dog activities (e.g., barking, running, chewing, digging) can be inferred with an accuracy of 70\% from a collar-worn wearable with accelerometers. More recently, Chambers et al.~\cite{chambers2021deep} used deep-learning models to infer dog activities with a collar-worn accelerometer, and showed that activities such as eating and drinking could be inferred with high accuracy, while behaviors such as licking, petting, rubbing, and sniffing were harder to identify. Beyond activity tracking, Griffies et al.~\cite{griffies2018wearable} used wearables to detect pruritic behaviors (i.e., scratching, head shaking). In a laboratory study with over 360 dogs, they showed that algorithms could be trained to infer head shaking and scratching with sensitivities over 70\% and specificities over 90\%. Wearable devices have also been used to monitor dog breathing patterns with reasonable accuracies~\cite{cotur2022bioinspired}.

\subsection{Dog Activity Levels and Personality Traits}\label{subsec:actvity_levels_personality}
Prior work in animal-computer interaction and canine behavior has highlighted certain relationships between personality traits and activity levels. For example, previous studies found that more extroverted dogs showed higher activity levels in the park~\cite{carrier2013exploring}, higher energy levels~\cite{gosling2003dog}, with significantly greater proportions of time spent with other dogs. Amicable dogs showed frequent behaviors indicative of play (high activity level), while neurotic dogs showed higher frequencies of hunched posture (low activity level)~\cite{carrier2013exploring}. Hence, extraversion, amicability, and neuroticism (traits that come from MCPQ-R) can be directly linked to activity levels. Further, even though not directly studied, prior studies linked psychological aspects such as fearfulness and aggression (corresponding to the three traits of DPQ--- fearfulness, aggression towards people, and aggression towards animals) to activity levels. For example, in domestic dogs, it has been found that a higher degree of impulsivity correlates with high activity levels~\cite{wan2013drd}, poor attention span~\cite{vas2007measuring}, and human-directed aggression~\cite{rayment2015applied, peremans2003estimates}. Further, previous studies linked activity levels to negative emotions and stress~\cite{beaudet1994predictive, rayment2015applied, jones2014use}, which, in turn, can be seen as the roots of fearfulness and aggression~\cite{beaudet1994predictive}. Moreover, neuroticism has been directly linked to activity levels in some studies \cite{carrier2013exploring}, but it has also been observed to be converging with fearfulness according to other studies \cite{posluns2017comparing}, hence providing evidence on how activity-levels could be indirectly informative of fearfulness. Studies have also found that excessively high or low activity levels are predictive of successful dog training (i.e., trainability and certain levels of fearfulness~\cite{weiss2002selecting}; traits captured from DPQ and MCPQ-R).

In summary, previous wearable sensing literature explored aspects such as monitoring dog activity, detecting pruritic behavior, and tracking breathing patterns. While previous literature explored a few aspects concerning the relationship between dog activity and personality traits, this relationship still represents an under-explored area. Our study aims to partly fill this gap by exploring the relationship between ten personality traits captured from two canine personality questionnaires and dog activity.
\section{Research Questions}
\label{sec:rqs}

We set out to explore whether dog personality can be automatically inferred from wearable data in everyday settings by answering three questions:

\begin{itemize}[wide, labelwidth=!, labelindent=0pt]
    \item[\textbf{RQ\textsubscript{1}:}] Which dog activity-level features and statistical ones can be extracted from wearable data?
     \item[\textbf{RQ\textsubscript{2}:}]  Which dog activity-level features and statistical ones are associated with dog personality?
    \item[\textbf{RQ\textsubscript{3}:}]  To what extent activity-level, statistical, and demographic features are predictive of dog personality?
\end{itemize}{}

\section{Patchkeeper}
\label{sec:patchkeeper}

\begin{figure*}
\captionsetup{labelfont=normalfont}
\centerline{\includegraphics[width=\linewidth]{figures/device_diagram.png}}
\caption{\emph{A:} The Patchkeeper device is attached to an elastic adjustable band. The device comes with two lights: a \emph{green light} indicating whether the device is ON; and a \emph{red light} indicating whether the device is in charging mode. \emph{B:} The band can be strapped on the dog's chest. }
\label{fig:device_and_dogs}
\end{figure*}

Patchkeeper (Figure~\ref{fig:device_and_dogs}a) is a wearable device developed at {Nokia Bell Labs} for behavioral monitoring of both humans and animals. It contains a photoplethysmography (PPG) sensor, an electrocardiogram (ECG) sensor, an accelerometer, a gyroscope, and a microphone. In the current study, only the inertial measurement unit (IMU) sensors (i.e., accelerometer and gyroscope) were used, and PPG, ECG, and microphone were not used due to the dog hair and privacy concerns (more details in Section~\ref{subsec:device_sensors_used}). The IMU sensor is a BMI160 from Bosch Sensortec\footnote{\url{https://www.bosch-sensortec.com/products/motion-sensors/imus/bmi160/}}. It is a small, low-power, low-noise 16-bit chip designed for mobile applications. It provides highly accurate gyroscope and accelerometer data in real time. The IMU's sampling rate was set to 50 samples per second. This sampling rate allowed for striking the right balance between obtaining reasonably fine-grained data for our analysis and storage capacity requirements. The microcontroller unit (MCU) is an nRF52840 from Nordic Semiconductor\footnote{\url{https://www.nordicsemi.com/products/nrf52840}}, which contains a 64 MHz Cortex-M4 processor with floating point unit (FPU). All data was saved in a micro-SD card on the printed circuit board (PCB).

The device dimensions are 76x52x15mm with a weight of 56 grams. It contains a 400mAh lithium polymer battery, which can last more than 24 hours while continuously recording data. The battery takes around two hours to be fully charged and comes with a USB-C charging port for hassle-free charging with any commercially available charger. With a two-hour daily charge, the device runs continuously without any loss of data. The device has a switch with ON and OFF sides marked with red and green colors. For better user experience, we included different lights on the device (Figure~\ref{fig:device_and_dogs}a): \emph{(i)} a green light flashing every 10 seconds indicates that the device is ON, it is working properly, and data is being recorded; \emph{(ii)} a static red light indicates that the device is fully charged, and \emph{(iii)} a flashing red light indicates an issue with the device or the memory card.

\section{Animal Study}
\label{sec:animal_study}

Having developed our custom-made wearable device to collect dog activity data, we conducted a one week in-the-wild study to understand the link between dog behavior and personality.

\subsection{Materials and Apparatus}\label{subsec:materials}
Each dog owner received a package, fitted in a medium-sized letter envelope, weighing approximately 500 grams. The package contained: a Patchkeeper device, a charging cable, three black elastic straps, a consent form, an information sheet, questionnaires (i.e., DPQ, MCPQ-R, and a post-study questionnaire), and a pre-paid return envelope. Upon completion of the study, the owner shipped back the package using the pre-paid return package.

\subsubsection{{Patchkeeper and Elastic Straps.}}\label{subsec:device_sensors_used} As the device can be used on both human and animal subjects (Section~\ref{sec:patchkeeper}), and given the requirement of continuous monitoring for one week, we decided to deactivate the ECG and PPG sensors, and the audio microphone. ECG and PPG were disabled for two reasons: first, they relied on skin conductance, which is made difficult by dog hair; and second, they required additional straps, which would place additional effort on the owners, making it more likely for them to drop out. Audio was also deactivated due to privacy reasons as the device would otherwise continuously capture audio throughout the day. It would be extremely awkward to listen to intimate moments or any audio conversation that creeps into the device due to the pet's movements. To ensure that the device would fit various dog sizes, we used an adjustable elastic band that can be strapped to the pet's chest (Figure~\ref{fig:device_and_dogs}b). These are off-the-shelf straps that can be found on Amazon and are comfortable to wear. The device can be simply attached to the strap using a sticky patch. We also considered alternative areas (e.g., neck) to place the device, weighing various aspects. First, some breeds have a more pronounced dewlap (loose, saggy skin around the neck/throat) than others, whilst the chest is generally not affected in such a way. Second, it has been found that the skin near the axilla (armpit) and ventral abdomen (lower chest/thorax, top of the belly) is significantly thinner than that in the dorsal (top of the dog) areas~\cite{theerawatanasirikul2012histologic}. Third, double coated breeds (e.g., the golden retriever, Samoyed, and German shepherd included in this study) have coarse guard hairs and dense undercoats, with this being particularly pronounced in the dorsal areas but less so near the axilla and ventral abdomen areas. Taking all these aspects into consideration, the chest area (behind the forelegs) has the benefits of thinner skin whilst removing breed-to-breed variation in our sample (previous work also favored the chest area~\cite{foster2020preliminary}). To ensure that the position of the device did not impact the results, we intentionally used wider straps with 5cm wide rubbered features and strong tensioning force to make the device intimately connected to the fixed location at the pet's chest. During pilot studies in the design of the device, we estimated an approximate sensor dislocation of $\pm$2cm, which was sufficient to guarantee fixed sensor location over a long period of use.

\subsubsection{{Questionnaires.}} Dog owners answered two types of questionnaires. A Pre-Study Questionnaire (Q1) and a Post-Study Questionnaire (Q2). Q1 was completed before the study and had two sections. The first section captured demographic information of the owner (i.e., age, sexual identity, occupation status, and ethnicity), followed up with the Personality Inventory (TIPI)~\cite{gosling2003very}, which is a 10-item measure of the Big Five (or Five-Factor Model) dimensions. The second section captured basic information about the dog (i.e., the dog's age, breed, sexual identity, weight, typical activity levels, disease conditions, and whether it is neutered or not). Q2 was completed after the study and had two sections as well. The first section captured user experience and dog owners' perceived utility of wearable platforms for dog monitoring. The user experience of the Patchkeeper was captured by a Likert scale of 1 to 7 (1 = very bad, 7 very good) and corresponding feedback. In a similar vein, we captured the perceived utility of commercial wearable pet monitoring devices in general by a Likert scale of 1-7 (1 = not very important; 7 = very important) and corresponding feedback. Additionally, we asked dog owners to rate on a scale of 1-7 (1 = strongly not preferred, 7 = strong preferred) their likelihood of adopting a mobile app that uses Patchkeeper's data for dog monitoring. We provided sample options including: monitoring activity types, identifying when dogs are not in a healthy state, finding a community of dogs with a similar personality, or monitoring the mood and stress of dogs. The second section of Q2 asked owners to complete the Dog Personality Questionnaire (DPQ)~\cite{jones2008development} and the Refined Monash Canine Personality Questionnaire (MCPQ-R)~\cite{ley2009refinement}.

\begin{table*}
\captionsetup{labelfont=normalfont}
\caption{Overview of dog demographics.}
\label{tab:participants}
  \centering
  \begin{tabular}{lccccc}

    \textbf{\cellcolor[HTML]{FFFFFF} Dog ID} &
    \textbf{\cellcolor[HTML]{FFFFFF} Breed} &
    \textbf{\cellcolor[HTML]{FFFFFF} Sex} &
    \textbf{\cellcolor[HTML]{FFFFFF} Weight} &
    \textbf{\cellcolor[HTML]{FFFFFF} Neutered?} &
    \textbf{\cellcolor[HTML]{FFFFFF} Birth Year}
    \\

    \hline

    \#1 &
    Golden Retriever &
    Female &
    30 kg &
    Yes &
    2018
    \\

    \#2 &
    Golden Retriever &
    Male &
    35 kg &
    No &
    2021
    \\

    \#3 &
    Poodle (Toy) &
    Male &
    8 kg &
    No &
    2020
    \\

    \#4 &
    Dalmadoodle - 75\% Poodle, 25\% Dalmatian &
    Female &
    13 kg &
    Yes &
    2020
    \\

    \#5 &
    Golden Retriever &
    Male &
    40 kg &
    No &
    2021
    \\

    \#6 &
    Working English Setter &
    Male &
    29 kg &
    Yes &
    2017
    \\

    \#7 &
    Boxer &
    Female &
    25 kg &
    No &
    2020
    \\

    \#8 &
    Samoyed &
    Male &
    25 kg &
    No &
    2018
    \\

    \#9 &
    Cockapoo &
    Female &
    10 kg &
    Yes &
    2011
    \\

    \#10 &
    Working English Setter &
    Female &
    31 kg &
    No &
    2016
    \\

    \#11 &
    Mixed &
    Male &
    15 kg &
    Yes &
    2021
    \\

    \#12 &
    Cavalier King Charles Spaniel &
    Female &
    8.5 kg &
    Yes &
    2019
    \\

  \bottomrule
\end{tabular}
\end{table*}

\subsubsection{{Information Sheet and Consent Form.}}
The information sheet described the study protocol (Section~~\ref{subsec:study_protocol}). The consent form highlighted two aspects: confidentiality and voluntary participation. In terms of confidentiality, the form explained that all data would be kept confidential except in cases where the researchers were legally obligated to report specific incidents (e.g., dog abuse). The collected phone numbers and email addresses will not be used in any scientific output, and that confidentiality will be preserved by: \emph{a)} assigning code numbers for dog owners in all research documents; and \emph{b)} keeping notes, data, and any other dog owner identifiers in a password-protected hard drive, securely stored at the facilities of the {Nokia Bell Labs}. In terms of voluntary participation, the form explained that a signature was required to participate. Additionally, withdrawal from the study was allowed at any time and without giving a reason, even after signing the consent form. Upon withdrawal, all data will be deleted.

\subsubsection{{Pre-Paid Letter Cover and WhatsApp Hotline.}} To ease dog owners participation, we included in our package a pre-paid return package. Upon completion, they placed all materials received into the return package and posted it. To have effective communication with the dog owners throughout the study, we used a dedicated WhatsApp number as a hotline. This number was used by the first author to deal with matters related to the study (e.g., unable to place the strap or charge the device).

\begin{figure*}
\captionsetup{labelfont=normalfont}
\centerline{\includegraphics[width=\linewidth]{figures/study_protocol.png}}
\caption{Our study protocol has three phases. In the \emph{pre-study} phase, dog owners received the study package, including the PatchKeeper device and questionnaires; in the \emph{study} phase, data collection for seven days took place; and, in the \emph{post-study} phase, dog owners returned the package and answered a follow-up survey about their experience using the device.}
\label{fig:protocol}
\end{figure*}

\subsection{Study Protocol}\label{subsec:study_protocol}
The study protocol has three periods: pre-study, study period, and post-study (Figure~\ref{fig:protocol}).

\subsubsection{Pre-Study} Once the dog owners received the package, they familiarized themselves with the device and answered the pre-study questionnaire. During that period, they were encouraged to ask questions via the hotline, and were instructed to fully charge the Patchkeeper and send a picture of the dog with the device turned on, after a full charge every day (this was a preemptive measure to ensure compliance, but, at the same time, to guarantee data quality).

\subsubsection{Study Period.} During the seven-day period, the device captured sensor data between 12am and 6pm (continuously for 18 hours), and it could be charged for two hours between 6pm and 12am. Enforcing the same charging schedule across all dog owners enabled us to obtain comparable data across dogs. Of course, this comes with the caveat that we might not have 2-3 hours of data between evening hours; a drawback that we were willing to accept to ensure high quality data during other time slots. In summary, each evening, the dog owners would remove the strap from the dog, turn the device off, fully charge it, turn it back on, and put it back on the dog. Afterward, they would send a message with a picture of the dog wearing the device via the hotline. In the morning, they would again be asked to check that the device was working and was correctly positioned around the dog's chest. During all other time periods, no interaction was required from dog owners as the device would automatically capture all data. Furthermore, we encouraged the dog owners to voluntarily send us in-situ self-reports (in the form of images or short video clips) of various dog activities throughout the day.

\subsubsection{Post-Study.}\label{subsec:post_study} During that period, dog owners answered the post-study questionnaire. They placed all materials and apparatus in the pre-paid package, and shipped it back to the return address. Upon successful completion of the study, dog owners received a \$25 Amazon gift voucher and a report summarizing their dog activity profile over the seven days of the study.

\subsection{Recruitment}
Recruitment for in-the-wild human studies is typically difficult~\cite{ellard2015finding}, and so it is for animal studies. We employed two techniques that were proven (un)successful to varying degrees.

\begin{itemize}[leftmargin=*,align=left]
    \item Social media and local communities (Twitter, Facebook, Instagram, and NextDoor): Twitter and Facebook are used to advertise scientific studies~\cite{whitaker2017use, sibona2012purposive}---both channels were not very successful in this study. Instead, Instagram posts on profiles dedicated to dogs with 1000s of followers were successful to some extent. Finally, Nextdoor\footnote{\url{https://nextdoor.com/}}, a social media site for local communities, was the most successful recruitment strategy (40\% of the dogs were recruited through it). A banner of the study was also shared within the communities of Cambridge Dog Meetup.
    \item Word of Mouth: One researcher from Nokia Bell Labs, who is not part of conducting the study, participated in the study with his dog. He spoke to his neighbors about the study, who also signed up. Shortly after, this created a snowball effect (30\% of the dogs were recruited through word of mouth).
\end{itemize}

Having a variety of recruitment techniques, we were able to reach out to 31 dog owners in Cambridge, United Kingdom. Of these, 22 signed up for the study and received the package. 10 of them withdrew during the study for various reasons: high temperature, including a heatwave, making it difficult for the dog to wear the strap continuously (2/10), owners going away for summer holidays (2/10), strap not holding to the body of the dog due to its curvy shape (1/10), dogs not being in healthy conditions (i.e., leg injury after a run, wound on the neck, bug bites) during the time of the experiment (3/10), and dogs not appearing to feel happy about wearing the strap (2/10). This left us with 12 healthy dogs that successfully completed the study. Note that these 12 dogs were all healthy (as reported by their owners), and every morning the first author checked with the owners whether any of the dogs displayed peculiar behavior (e.g., snagging on objects, appearing to feel uncomfortable) due to the wearable. No such incident was reported. However, we had an incident wherein a dog jumped into a body of water, destroying the device. This dog continued the study later with a replacement device.
The recruitment took place during the summer period, with starting dates ranging from July to August. The study was approved by Nokia Bell Labs, and the study protocol stated that the collected data will be analyzed for research purposes only. In accordance to GDPR, no researcher involved in the study could have tracked the identities of the dog owners after the end of the study, and all responses were analyzed after anonymization at an aggregated level.

\section{Methodology}
\label{sec:statistical_analysis}

Using the extracted features and self-reported personality (Section~\ref{sec:dataset}), we set out to understand which features are associated with dog personality (\textbf{RQ\textsubscript{2}}), and, to what extent these features are predictive of personality (\textbf{RQ\textsubscript{3}}). In so doing, we defined our dependent variables, conducted a series of statistical analyses, and developed machine learning classifiers to predict dog personality, which we describe next.

\subsection{Dependent Variables}
The ten personality traits of both DPQ and MCPQ-R (five each) served as our dependent variables for both statistical analyses and classification tasks. We binarized each personality trait (i.e., whether a dog scored high or low in a given trait ---for example, high or low in fearfulness) using the median value across all dogs in our dataset. In other words, we computed the median value across all dogs for each trait, and binarized each trait to be either high or low. The choice of binary traits was reinforced by previous literature on inferring human personality from mobile data~\cite{khwaja2019modeling, vinciarelli2014survey}.

\subsection{Statistical Analyses}
These analyses allowed us to identify statistically significant features that help discriminate between high and low personality scores for each trait (Table~\ref{tab:tstatistics}). We report the top five features for each personality trait with: \emph{a)} the highest $t$-statistic\footnote{$p$-values~\cite{Greenland2016} are marked with an asterisk (*) after bonferroni correction~\cite{weisstein2004bonferroni}.}~\cite{Kim2015}, and \emph{b)} the highest Cohen's-d\footnote{the 95\% confidence intervals~\cite{Lakens2013} overlapping with zero are marked with an asterisk (*).}~\cite{Rice2005}. As a rule of thumb, a Cohen's-d of 0.2 illustrates a small effect size, 0.5 a medium effect size, while 0.8 a large effect size~\cite{kim2015statistical}. Results are presented in Section~\ref{subsec:statistical_analysis}.

\subsection{Classification and Cross-Validation Methods}
In the next set of experiments, we used Python with Keras~\cite{chollet2015keras} and scikit-learn~\cite{pedregosa2011scikit} frameworks. For dimensionality reduction, we used principle component analysis (PCA)~\cite{abdi2010principal} and retained features with a variance of 95\% (leaving us with 3-5 features to train models, depending on the set of features used---we discuss these features in a subsequent section). All experiments were done with the leave-k-dogs-out strategy (in a similar manner to the leave-one/K-out setting, which is typical cross-validation for human subjects \cite{meegahapola2021one}) in which data in training and testing splits do not come from the same dog. Hence, this is subject-independent~\cite{meegahapola2022sensing}. We conducted all experiments with five iterations and K = 4 --- that is, in each experiment, four dogs were left out for the testing set such that this set contains instances from both high and low scores of each personality trait. This allowed us to measure the mean and standard deviation of the models' performance across iterations. Given the small sample size, the choice of four dogs was a reasonable one. As for performance metric, we chose the area under the receiver operating characteristic curve (AUC), which is a holistic measure assessing how well a model performs for both classes (i.e., distinguishing high and low traits)~\cite{bradley1997use}. In total, we set up three experiments, and tested four types of models (S1) using a combination of features (S2 and S3).

\begin{itemize}[leftmargin=*,align=left]
    \item S1---Model Types: Given the small dataset size (typical in animal studies \cite{hirskyj2021forming, weiss2013wagtag, ladha2013dog}), we used four types of classifiers: \emph{(a)} Support Vector Machines (SVM)~\cite{noble2006support}, \emph{(b)} Light Gradient Boosting Machine (L-GBM)~\cite{ke2017lightgbm}, \emph{(c)} Naive Bayes (NB)~\cite{webb2010naive}, and \emph{(d)} Random Forest (RF)~\cite{cutler2011random}.
    \item S2---Feature Types: As previously mentioned (Section~~\ref{subsec:data_processing_pipeline}), we generated two main types of features from the inertial data: activity-level features ({ACT}) and statistical features ({STAT}). The former set of features is typically more interpretable but costly to obtain due to the power processing needed to generate the features, while the latter set of features is not computationally expensive but it is less interpretable. In addition, we used demographic attributes ({DEM}) such as sex of the dog, weight, age, neutered, and training rating as input to the model because prior work suggested connections between these attributes and dog personality (Section~\ref{sec:related_work}). As the dog owner's personality has been previously linked to the dog's personality and well-being~\cite{kubinyi2009dog, hoglin2021long}, we also used the dog owner's information ({O-INFO}) including their sex and personality traits captured from the Personality Inventory~\cite{gosling2003very}.
    \item S3---Time of Day: These features were computed for three time periods of the day (i.e., night, morning, and afternoon). In S1 and S2, we used all the features. As mentioned in Section~\ref{sec:statistical_analysis}, the same feature captured at different times of day may have differences in statistical significance values. For example, sleeping time in the morning (M) could be informative to discriminate high and low levels of Extraversion, while sleeping time in the afternoon (A) might not be. Hence, in this set of experiments, we incorporated the time period of the day, and sought to understand whether developing separate models for different time periods yield better performance. For example, if a model trained with data from only morning features performs better, it would mean that we only need six hours of data from a dog to perform the inference.
\end{itemize}
\section{Dataset}
\label{sec:dataset}
Having successfully deployed Patchkeeper in an in-the-wild study and collected more than 1300 hours of accelerometer and gyroscope data, we then applied a processing pipeline to that data.

\begin{figure*}
\captionsetup{labelfont=normalfont}
\centerline{\includegraphics[width=0.8\linewidth]{figures/validation_study.png}}
\caption{Comparison of dog\#3 is monitored by activity levels generated from Patchkeeper (top) and Pitpat (bottom) for 24 hours.}
\label{fig:validation_study}
\end{figure*}

\begin{figure*}
\captionsetup{labelfont=normalfont}
\centerline{\includegraphics[width=0.8\linewidth]{figures/activity_level_plot.png}}
\caption{Example of four types of activity levels of dog\#1 (i.e., sleep, sedentary, light, and moderate-vigorous) generated from Patchkeeper.}
\label{fig:activity_level_diagram}
\end{figure*}

\subsection{Data Processing Pipeline}\label{subsec:data_processing_pipeline}
\subsubsection{{Activity-Level features.}}
\label{subsec:activity-level}
This set of features describes dog behaviors derived from accelerometer data, and is interpretable. To extract these features, we used a state-of-the-art data processing pipeline to convert the triaxial data to acceleration~\cite{doherty2017large, willetts2018statistical}. The processing included four steps: \emph{a)} ten-second samples from static sections (no movement) of accelerometer data were obtained to optimize the gain and offset for each of the X, Y, and Z axes to fit a unit gravity sphere~\cite{willetts2018statistical}; \emph{b)} data were re-sampled at 100Hz using linear interpolation, and acceleration was calculated using the euclidean norm of X, Y, and Z axis values; \emph{c)} a fourth-order butterworth filter was used to remove noise; and \emph{d)} one gravity (1G) unit was removed from the data, and the remaining negative values were truncated at zero.

Next, using non-overlapping time windows of 60 seconds, 126 time and frequency domain features such as mean, standard deviation, median, minimum, maximum, 25\textsuperscript{th} and 75\textsuperscript{th} percentiles of vector magnitude, kurtosis, and skewness were generated~\cite{willetts2018statistical, doherty2018gwas, walmsley2021reallocation}. Using these features, we used a pre-trained model based on Hidden Markov Models and Balanced Random Forests~\cite{walmsley2022reallocation} to classify acceleration into four different activity levels: \emph{sleep}, \emph{sedentary}, \emph{light}, and \emph{moderate-vigorous}. These activity levels are in line with prior studies on dog activity-levels~\cite{morrison2013associations, ortmeyer2018combining, weiss2013wagtag}.

As the data processing pipeline was initially developed for wrist wearables worn by humans, we conducted a validation step to ensure transferability to animals. To do that, we used a consumer-grade dog activity monitor called PitPat\footnote{\url{https://www.pitpat.com/}} on two dogs (dog\#3 and dog\#8) for three days. These two dogs also took part in the larger in-the-wild study. In total, we collected over 120 hours of sensor data from both devices, and a total of 83 self-reports (e.g., the dog is sleeping, running) from dog owners. A comparison of our 24-hour data processing pipeline and PitPat's output is shown in Figure~\ref{fig:validation_study}.  In terms of ground truth obtained from PitPat (in total, we analyzed 100 data points), our model performed with an accuracy of: 98\% in detecting sleeping (sections where PitPat showed no activity); 92\% in detecting high intense moderate-vigorous activities (sections where PitPat showed a peak in activity levels), and 96\% in detecting sedentary or light activity levels (sections where PitPat showed a medium level of activities). In terms of self-reported ground truth (including pictures), our model was 91\% accurate in determining the 83 activity levels provided by dog owners. This answered our \textbf{RQ\textsubscript{1}}, allowing us to conclude that activity levels can be extracted with accuracies over 90\%.

Having established the reliability of our data processing pipeline, we first obtained how long a particular dog had been engaging in activities at different levels (i.e., percentage of time spent in sleep, sedentary, light, and moderate-vigorous activity levels), resulting in four features. We then used the acceleration time series to extract statistical features such as its minimum, maximum, mean, median, and standard deviation, resulting in five features. For simplicity, we call these nine features \emph{activity-level} features throughout the paper.

\subsubsection{{Statistical Features.}}
This set of features was derived from complex associations in the time series of both accelerometer (x,y,z) and gyroscope (x,y,z) and, as such, is less interpretable compared to the activity-level features but computationally less expensive to obtain. To extract these statistical features, we used the tsfel library~\cite{barandas2020tsfel}. The library allowed us to extract 56 features (e.g., min, max, std, mean, median, kurtosis, skewness, absolute energy, zero crossing rate, histogram, and empirical cumulative distribution function) that describe temporal and statistical aspects of the time series nature of the data\footnote{\url{https://tsfel.readthedocs.io/en/latest/descriptions/feature_list.html}}.

\subsubsection{{Unit of Analysis.}}
A typical way of capturing temporal dynamics in HCI and UbiComp studies is to use time windows at different times of day when calculating features~\cite{obuchi2020predicting, wang2020predicting, wang2017predicting, nepal2020detecting, wang2022first, constantinides2018personalized}. A large time window of eight hours, dividing the day into three periods, has been previously used in dog studies, and it has been found, for example, that studying night sleep separately from day sleep provided more meaningful insights about sleeping patterns~\cite{schork2022cyclic, bodizs2020sleep} than studying sleeping during the whole day. Drawing from this prior line of work, we resorted to three time windows for our analysis: \emph{a)} night (N): time from 12am to 5.59am; \emph{b)} morning (M): time from 6am to 11.59am.; and \emph{c)} afternoon (A): time from 12pm to 5.59pm. For example, at night, a dog could be showing activity levels as 60\% sleeping, 20\% sedentary, 15\% light, and 5\% moderate-vigorous. Hence, for each time window, we extracted a total of 65 features, including the nine activity-level and the 56 statistical features.

\begin{figure*}[t]
\begin{center}

    \begin{subfigure}[t]{0.45\textwidth}
        \centering
        \includegraphics[width=\textwidth]{figures/dpq_distribution_v3.png}
        \caption{\centering DPQ}
        \label{fig:dpq}
    \end{subfigure}
    \hfill
    \begin{subfigure}[t]{0.45\textwidth}
        \centering
        \includegraphics[width=\textwidth]{figures/mcpq_distribution_v4.png}
        \caption{\centering MCPQ-R}
        \label{fig:mcpqr}
    \end{subfigure}
    \caption{Average personality trait scores for five personality factors measured through DPQ (in a Likert scale 1-7) and MCPQ-R (in a Likert scale 1-6), respectively. Scores for MCPQ-R were higher (except Neuroticism), whereas scores for DPQ were more spread out.
    }
    \label{fig:personality_scores}
\end{center}
\vspace{-0.2 in}
\end{figure*}

\subsection{Descriptive Statistics of Personality Traits and Activity Levels}
The distributions of personality traits are shown in Figure~\ref{fig:personality_scores}, and a summary of statistics of the recruited dogs is in Table~\ref{tab:participants}. Recruited dogs were over one year old, with a mean age of three years and ten months, 65\% of them were female dogs, and were all medium to small dogs. In terms of dog personalities, the DPQ factors: \emph{Fearfulness}, \emph{Aggression Towards People}, and \emph{Aggression Towards Animals} had average scores below 3.2, whereas the \emph{Excitability} and \emph{Responsiveness to Training} had high average scores above 4.8. For MCPQ-R, \emph{Neuroticism} had an average score of 2.67, while the other four factors had average scores on or above 4.38. Overall, the mean percentages across the personality dimensions were comparable to previous studies~\cite{ley2009refinement, carrier2013exploring}. Further, Figure~\ref{fig:activity_time_periods} shows the average activity level across all dogs as a percentage of total time ($y$-axis) for different time periods of the day ($x$-axis). The night was predominantly spent sleeping (63.3\%) whereas morning was predominantly spent at other types of activity such as sedentary (36.5\%), light (13.5\%), or moderate-vigorous (9.3\%).

\begin{figure*}
\captionsetup{labelfont=normalfont}
\centerline{\includegraphics[width=0.8\linewidth]{figures/percentage_of_time_2x.png}}
\caption{Percentage of time spent by all dogs on average in each of the four activity level for sleep, sedentary, light, moderate-vigorous at three different time of day (Night, Morning, Afternoon). Dogs slept more at night, engaged in sedentary activity in the morning and the afternoon, and engaged in physical activity (light or moderate-vigorous) during the morning.}
\label{fig:activity_time_periods}
\end{figure*}