code: def example2(m=100, scale=0.01, stride=2):
      # m,k = 100,1
      upper = 6
      xs1 = np.linspace(1, upper, m)[:, np.newaxis]
      y1true = np.sum(np.sin(xs1**2), 1)[:, np.newaxis] / xs1
      y1 = y1true + 0.05 * np.random.randn(m, 1)
  
      ridgecoeff = 1e-10
      # stride = 2 #use only some points as trainig points e.g 2 means every 2nd
      gp1 = GaussProcess(
          xs1[::stride, :],
          y1[::stride, :],
          kernel=kernel_euclid,
          ridgecoeff=1e-10,
      )
      yhatr1 = gp1.predict(xs1)
      plt.figure()
      plt.plot(y1true, y1, "bo", y1true, yhatr1, "r.")
      plt.title(
          "euclid kernel: true versus noisy (blue) and estimated (red) observations"
      )
      plt.figure()
      plt.plot(y1, "bo-", y1true, "go-", yhatr1, "r.-")
      plt.title(
          "euclid kernel: true (green), noisy (blue) and estimated (red) "
          + "observations"
      )
  
      gp2 = GaussProcess(
          xs1[::stride, :],
          y1[::stride, :],
          kernel=kernel_rbf,
          scale=scale,
          ridgecoeff=1e-2,
      )
      yhatr2 = gp2.predict(xs1)
      plt.figure()
      plt.plot(y1true, y1, "bo", y1true, yhatr2, "r.")
      plt.title(
          "rbf kernel: true versus noisy (blue) and estimated (red) observations"
      )
      plt.figure()
      plt.plot(y1, "bo-", y1true, "go-", yhatr2, "r.-")
      plt.title(
          "rbf kernel: true (green), noisy (blue) and estimated (red) "
          + "observations"
      )
  
file_path: statsmodels/statsmodels/sandbox/regression/kernridgeregress_class.py
imports: import numpy
  from scipy import spatial
  import matplotlib.pylab
label_desc: Use image node_id 4 for calling a global function with example usage: example2(m, scale, stride) without return types