docstr: GaussianProcessFilter test.
  Creates a sine wave, adds noise and assumes the GP filter
  predicts values closer to real values
docstr_tok: ["GaussianProcessFilter","test",".","Creates","a","sine","wave",",","adds","noise","and","assumes","the","GP","filter","predicts","values","closer","to","real","values"]
code: def test_gaussian_process(self):
      """GaussianProcessFilter test.
      Creates a sine wave, adds noise and assumes the GP filter
      predicts values closer to real values
      """
      theta = np.radians(np.linspace(0, 360 * 5, 200))
      testing_signal = TimeSeries.from_values(np.cos(theta))
  
      noise = TimeSeries.from_values(
          np.random.normal(0, 0.4, len(testing_signal))
      )
      testing_signal_with_noise = testing_signal + noise
  
      kernel = ExpSineSquared(length_scale_bounds=(1e-3, 1e3))
      gpf = GaussianProcessFilter(
          kernel=kernel,
          alpha=0.2,
          n_restarts_optimizer=10,
          random_state=42,
      )
      filtered_ts = gpf.filter(testing_signal_with_noise, num_samples=1)
  
      noise_diff = testing_signal_with_noise - testing_signal
      prediction_diff = filtered_ts - testing_signal
      assert noise_diff.values().std() > prediction_diff.values().std()
  
      filtered_ts_median = gpf.filter(
          testing_signal_with_noise, num_samples=100
      ).quantile_timeseries()
      median_prediction_diff = filtered_ts_median - testing_signal
      assert (
          noise_diff.values().std()
          > median_prediction_diff.values().std()
      )
  
imports: import numpy
  import pandas
  from nfoursid import kalman, state_space
  from sklearn.gaussian_process.kernels import RBF, ExpSineSquared
  from darts import TimeSeries
  from darts.metrics import rmse
  from darts.models.filtering.gaussian_process_filter import GaussianProcessFilter
  from darts.models.filtering.kalman_filter import KalmanFilter
  from darts.models.filtering.moving_average_filter import MovingAverageFilter
  from darts.utils import timeseries_generation
label_desc: Use image node_id 1 for calling the TestGaussianProcessFilter obj's underlying member method code with example usage: obj.test_gaussian_process() without return types