class_docstr: Frequency filter unit.
  
  :param low: Lower bound, inclusive.
  :param high: Upper bound, exclusive.
  :param mode: One of `tf` (term frequency), `df` (document frequency),
      and `idf` (inverse document frequency).
  
  Examples::
      >>> import matchzoo as mz
  
  To filter based on term frequency (tf):
      >>> tf_filter = mz.preprocessors.units.FrequencyFilter(
      ...     low=2, mode='tf')
      >>> tf_filter.fit([['A', 'B', 'B'], ['C', 'C', 'C']])
      >>> tf_filter.transform(['A', 'B', 'C'])
      ['B', 'C']
  
  To filter based on document frequency (df):
      >>> tf_filter = mz.preprocessors.units.FrequencyFilter(
      ...     low=2, mode='df')
      >>> tf_filter.fit([['A', 'B'], ['B', 'C']])
      >>> tf_filter.transform(['A', 'B', 'C'])
      ['B']
  
  To filter based on inverse document frequency (idf):
      >>> idf_filter = mz.preprocessors.units.FrequencyFilter(
      ...     low=1.2, mode='idf')
      >>> idf_filter.fit([['A', 'B'], ['B', 'C', 'D']])
      >>> idf_filter.transform(['A', 'B', 'C'])
      ['A', 'C']
docstr: Frequency filter unit.
code: def __init__(
      self, low: float = 0, high: float = float("inf"), mode: str = "df"
  ):
      """Frequency filter unit."""
      super().__init__()
      self._low = low
      self._high = high
      self._mode = mode
  
file_path: MatchZoo/matchzoo/preprocessors/units/frequency_filter.py
imports: import collections
  import typing
  import numpy
  from .stateful_unit import StatefulUnit
label_desc: Use image node_id 1 to create a new FrequencyFilter object from inherited base classes: StatefulUnit with example: obj = FrequencyFilter(low, high, mode)