## 8 An Imitation Learning Case  
Imitation learning is an efficient learning mechanism for reducing the complexity of search spaces and accelerating learning [56]. As shown in Figure 20, a hello motion is demonstrated by five different demonstrators. In each demonstration, the moving arm's joint angles mapped through GA-LVVJ are recorded with their corresponding temporal information. Each dataset of a certain joint is aligned temporarily and scaled to a fixed time step. Then, the datasets are encoded by Gaussian Mixture Model (GMM), and a generalized joint angle trajectory is produced through Gaussian Mixture Regression (GMR) [57]. Thus, the robot can learn from multiple demonstrations of the hello motion and reproduce a new one.  
First, the datasets of different demonstrators are aligned temporarily using Dynamic Time Wrapping (DTW) [58] to improve the coherence of data; then, the data of each demonstration is scaled to 100 time steps. The dataset of a joint \(\xi=\{\xi_{j}\}_{j=1}^{N}\) denotes \(N\) observations of \(\xi_{j}=\{\xi_{t,j},\xi_{a,j}\}\in R^{2}\)  
Figure 19: Snapshots of the robot and the human in the task-oriented teleoperation experiment.  
Figure 20: The snapshots of the hello motion performed by five demonstrators.  
where \(\xi_{t,j}\in R\) is a temporal value and \(\xi_{a,j}\in R\) is a joint angle. Then, the dataset is modeled by a GMM of K components, and each data point \(\xi_{j}\) is define by the probability density function  
\[p(\xi_{j})=\sum_{k=1}^{K}\pi_{k}\mathcal{N}(\xi_{j};\mu_{k},\Sigma_{k}), \tag{47}\]  
where \(\pi_{k}\) denotes the prior probability of component \(k\), and \(\mathcal{N}(\xi_{j};\mu_{k},\Sigma_{k})\) denotes the Gaussian distribution whose mean vector and covariance matrix are \(\mu_{k}\) and \(\Sigma_{k}\), respectively. The temporal and angular components of \(\mu_{k}\) and \(\Sigma_{k}\) can be represented separately as  
\[\mu_{k}=\{\mu_{t,k},\mu_{a,k}\},\Sigma_{k}=\begin{pmatrix}\Sigma_{tt,k}&\Sigma _{ta,k}\\ \Sigma_{at,k}&\Sigma_{aa,k}\end{pmatrix}. \tag{48}\]  
Then, a generalized joint angle trajectory can be obtained by applying GMR as follows. For each component \(k\), the expected distribution of the angular value \(\xi_{a}\) given the temporal value \(\xi_{t}\) is defined by  
\[p(\xi_{a}|\xi_{t},k)=\mathcal{N}(\xi_{a};\hat{\xi}_{a,k},\hat{ \Sigma}_{aa,k}), \tag{49}\] \[\hat{\xi}_{a,k}=\mu_{a,k}+\Sigma_{at,k}(\Sigma_{tt,k})^{-1}(\xi_{ t}-\mu_{t,k}),\] (50) \[\hat{\Sigma}_{aa,k}=\Sigma_{aa,k}-\Sigma_{at,k}(\Sigma_{tt,k})^{- 1}\Sigma_{ta,k}. \tag{51}\]  
Considering the complete GMM, the expected distribution of \(\xi_{a}\) given \(\xi_{t}\) is defined by  
\[p(\xi_{a}|\xi_{t})=\sum_{k=1}^{K}\beta_{k}\mathcal{N}(\xi_{a};\hat{\xi}_{a,k},\hat{\Sigma}_{aa,k}), \tag{52}\]  
where \(\beta_{k}=p(k|\xi_{t})\) is the probability of the component k given \(\xi_{t}\), i.e.,  
\[\beta_{k}=\frac{p(k)p(\xi_{t}|k)}{\sum_{i=1}^{K}p(i)p(\xi_{t}|i)}=\frac{\pi_{k }\mathcal{N}(\xi_{t};\mu_{t,k},\Sigma_{tt,k})}{\sum_{i=1}^{K}\pi_{i}\mathcal{N }(\xi_{t};\mu_{t,i},\Sigma_{tt,i})}. \tag{53}\]  
Then, the expected distribution of \(\xi_{a}\) given \(\xi_{t}\) is \(p(\xi_{a}|\xi_{t})\sim\mathcal{N}(\xi_{a},\hat{\Sigma}_{aa})\), where the parameters of the Gaussian distribution are  
\[\hat{\xi}_{a}=\sum_{k=1}^{K}\beta_{k}\hat{\xi}_{a,k},\hat{\Sigma}_{aa}=\sum_{ k=1}^{K}\beta_{k}^{2}\hat{\Sigma}_{aa,k}. \tag{54}\]  
Therefore, by evaluating \(\{\hat{\xi}_{a},\hat{\Sigma}_{aa}\}\), a generalized joint angle trajectory \(\hat{\xi}=\{\xi_{t},\hat{\xi}_{a}\}\) and associated covariance matrix can be obtained.  
This process is shown in Figure 21. The reproduced hello motion performed by NAO is depicted in Figure 22, which demonstrates the key features of a hello motion effectively.