docstr: Generate data with known frequency, remove the frequency, and infer.
docstr_tok: ["Generate","data","with","known","frequency",",","remove","the","frequency",",","and","infer","."]
code: def test_inferred_frequency(self, start, end, freq):
      """Generate data with known frequency, remove the frequency, and infer."""
      test_series_no_freq = _generate_random_data(
          start=start, end=end, freq=freq, remove_freq=True
      )
      test_series_with_missing_points = pd.concat(
          [test_series_no_freq.iloc[:2], test_series_no_freq.iloc[5:]],
          axis=0,
      )
      regularized_series = regularization.regularize_series(
          test_series_with_missing_points
      )
      # Check that the inferred frequency produces the same dates as the true
      # frequency. We avoid checking the inferred frequency directly in order
      # to allow frequencies that are equivalent to (but don't equal) what was
      # specified, e.g., 90 minutes rather than 1h30m.
      for date, inferred_date in zip(
          test_series_no_freq.index, regularized_series.index
      ):
          self.assertEqual(date, inferred_date)
  
file_path: probability/tensorflow_probability/python/sts/regularization_test.py
imports: import datetime
  from absl.testing import parameterized
  import numpy
  import pandas
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.sts import regularization
label_desc: Use image node_id 2 for calling the RegularizationTest obj's underlying member method code with example usage: obj.test_inferred_frequency(start, end, freq) without return types