code: def __init__(
      self,
      corpus,
      num_terms=40,
      start_category=None,
      timesteps_to_lag=5,
      seasonality_column=None,
      model=None,
  ):
      self.corpus_ = corpus
      self.num_terms_ = num_terms
      self.sorted_categores_ = np.array(sorted(corpus.get_categories()))
      if timesteps_to_lag > len(self.sorted_categores_):
          raise Exception(
              "Too many timesteps to lag. There are only %s categories"
              % len(self.sorted_categores_)
          )
      self.timesteps_to_lag_ = timesteps_to_lag
      if start_category is None:
          self.start_category_ = sorted(corpus.get_categories())[
              timesteps_to_lag
          ]
      else:
          if start_category not in corpus.get_categories():
              raise Exception(
                  "start_category %s needs to be a category in corpus"
                  % (start_category)
              )
          if (
              start_category
              in self.sorted_categores_[:timesteps_to_lag]
          ):
              raise Exception(
                  "start_category %s should have at least %s categories before it"
                  % (start_category, timesteps_to_lag)
              )
          self.start_category_ = start_category
      if seasonality_column:
          if seasonality_column not in self.corpus_.get_df().columns:
              raise Exception(
                  "seasonality_column should be none or a column in the source dataframe"
              )
      self.seasonality_column_ = seasonality_column
      self.model_ = model
  
file_path: scattertext/scattertext/diachronic/DiachronicTermMiner.py
imports: import numpy
  import pandas
  from sklearn.linear_model import LogisticRegression
  from scattertext.diachronic.BubbleDiachronicVisualization import BubbleDiachronicVisualization
  from scattertext.diachronic.DiachronicVisualizer import DiachronicVisualizer
label_desc: Use image node_id 1 to create a new DiachronicTermMiner object from inherited base classes: object with example: obj = DiachronicTermMiner(corpus, num_terms, start_category, timesteps_to_lag, seasonality_column, model)