TP-GMM can only show a single GMM in visualization
Closed this issue · 3 comments
Skylark0924 commented
Skylark0924 commented
The bug is caused by sampling the Gaussian to plot. It is useful when plotting the TP-GMR with Gaussian more than 10, but just shows one Gaussian in TP_GMM which has Gaussian less than 10.
+ if n_gaussian >= max_gaussian:
+ index_to_plot = np.linspace(0, n_gaussian, num=max_gaussian, dtype=np.int8)
+ else:
+ index_to_plot = np.arange(0, n_gaussian)
- for i in tqdm(range(0, n_gaussians, 10)):
+ for i in tqdm(index_to_plot):
# Plot the ellipsoid
R = np.real(sp.linalg.sqrtm(scale * covariance[i, :]))
rf.visualab.sphere_plot3d(mu[i, :], R, color=color, alpha=alpha, ax=ax)
Skylark0924 commented
Fixed by ef21eee
Skylark0924 commented