code: def stick_bgplvm(model=None, optimize=True, verbose=True, plot=True):
      
      from GPy.models import BayesianGPLVM
      from matplotlib import pyplot as plt
      import numpy as np
      import GPy
      import pods
  
      data = pods.datasets.osu_run1()
      Q = 6
      kernel = GPy.kern.RBF(Q, lengthscale=np.repeat(.5, Q), ARD=True)
      m = BayesianGPLVM(data['Y'], Q, init="PCA", num_inducing=20, kernel=kernel)
  
      m.data = data
      m.likelihood.variance = 0.001
  
      # optimize
      try:
          if optimize: m.optimize('bfgs', messages=verbose, max_iters=5e3, bfgs_factor=10)
      except KeyboardInterrupt:
          print("Keyboard interrupt, continuing to plot and return")
  
      if plot:
          fig, (latent_axes, sense_axes) = plt.subplots(1, 2)
          plt.sca(latent_axes)
          m.plot_latent(ax=latent_axes)
          y = m.Y[:1, :].copy()
          data_show = GPy.plotting.matplot_dep.visualize.stick_show(y, connect=data['connect'])
          dim_select = GPy.plotting.matplot_dep.visualize.lvm_dimselect(m.X.mean[:1, :].copy(), m, data_show, latent_axes=latent_axes, sense_axes=sense_axes)
          fig.canvas.draw()
          # Canvas.show doesn't work on OSX.
          #fig.canvas.show()
          input('Press enter to finish')
  
      return m
docs: Interactive visualisation of the Stick Man data from Ohio State University with the Bayesian GPLVM.