(self, i, mu, sigma, edges=100, linestyle='-.',
            linewidth=1.0, color='black', alpha=0.1, label='')
Plots ellipses in the xy plane representing the Gaussian distributions 
        specified by mu and sigma.
        Args:
            mu    - Tx3 mean vector for (x, y, z)
            sigma - Tx3x3 covariance matrix for (x, y, z)
            edges - the number of edges to use to construct each ellipse
Plots ellipses in the xy plane representing the Gaussian distributions 
        specified by mu and sigma.
        Args:
            mu    - Tx3 mean vector for (x, y, z)
            sigma - Tx3x3 covariance matrix for (x, y, z)
            edges - the number of edges to use to construct each ellipse
Plots ellipses in the xy plane representing the Gaussian distributions specified by mu and sigma . Args : mu - Tx3 mean vector for ( x y z ) sigma - Tx3x3 covariance matrix for ( x y z ) edges - the number of edges to use to construct each ellipse
def plot_3d_gaussian(self, i, mu, sigma, edges=100, linestyle='-.',
            linewidth=1.0, color='black', alpha=0.1, label=''):
        """
        Plots ellipses in the xy plane representing the Gaussian distributions 
        specified by mu and sigma.
        Args:
            mu    - Tx3 mean vector for (x, y, z)
            sigma - Tx3x3 covariance matrix for (x, y, z)
            edges - the number of edges to use to construct each ellipse
        """
        p = np.linspace(0, 2*np.pi, edges)
        xy_ellipse = np.c_[np.cos(p), np.sin(p)]
        T = mu.shape[0]

        sigma_xy = sigma[:, 0:2, 0:2]
        u, s, v = np.linalg.svd(sigma_xy)

        for t in range(T):
            xyz = np.repeat(mu[t, :].reshape((1, 3)), edges, axis=0)
            xyz[:, 0:2] += np.dot(xy_ellipse, np.dot(np.diag(
                    np.sqrt(s[t, :])), u[t, :, :].T))
            self.plot_3d_points(i, xyz, linestyle=linestyle,
                    linewidth=linewidth, color=color, alpha=alpha, label=label)
def plot_3d_gaussian ( self , i , mu , sigma , edges = 100 , linestyle = '-.' , linewidth = 1.0 , color = 'black' , alpha = 0.1 , label = '' ) : p = np . linspace ( 0 , 2 * np . pi , edges ) xy_ellipse = np . c_ [ np . cos ( p ) , np . sin ( p ) ] T = mu . shape [ 0 ] sigma_xy = sigma [ : , 0 : 2 , 0 : 2 ] u , s , v = np . linalg . svd ( sigma_xy ) for t in range ( T ) : xyz = np . repeat ( mu [ t , : ] . reshape ( ( 1 , 3 ) ) , edges , axis = 0 ) xyz [ : , 0 : 2 ] += np . dot ( xy_ellipse , np . dot ( np . diag ( np . sqrt ( s [ t , : ] ) ) , u [ t , : , : ] . T ) ) self . plot_3d_points ( i , xyz , linestyle = linestyle , linewidth = linewidth , color = color , alpha = alpha , label = label )