(self, as_string=False)
return results
Get the histograms for target and prediciton.

    In each percentage histogram are tuples of (bin_id, percent).
    bin_0: [0], bin_1: (0, bin_size), bin_2: [bin_size, 2*binsize), ...

    Args:
      as_string: output histogram as string.

    Returns:
      A dictionary of LengthHistograms for each type of "char" and "word".
Get the histograms for target and prediciton.
Get the histograms for target and prediciton .
def histograms(self, as_string=False) -> Dict[Text, LengthHistograms]:
    """Get the histograms for target and prediciton.

    In each percentage histogram are tuples of (bin_id, percent).
    bin_0: [0], bin_1: (0, bin_size), bin_2: [bin_size, 2*binsize), ...

    Args:
      as_string: output histogram as string.

    Returns:
      A dictionary of LengthHistograms for each type of "char" and "word".

    """
    results = {}
    for key in self._target_counts:
      target = _get_percentage(self._target_counts[key])
      prediction = _get_percentage(self._prediction_counts[key])
      relative = _get_percentage(self._relative_counts[key])

      if as_string:
        target = _print_histogram(target, self._bin_sizes[key])
        prediction = _print_histogram(prediction, self._bin_sizes[key])
        relative = _print_histogram(relative, self._bin_sizes["relative"])

      results[key] = LengthHistograms(target, prediction, relative)
    return results
def histograms ( self , as_string = False ) -> Dict [ Text , LengthHistograms ] : results = { } for key in self . _target_counts : target = _get_percentage ( self . _target_counts [ key ] ) prediction = _get_percentage ( self . _prediction_counts [ key ] ) relative = _get_percentage ( self . _relative_counts [ key ] ) if as_string : target = _print_histogram ( target , self . _bin_sizes [ key ] ) prediction = _print_histogram ( prediction , self . _bin_sizes [ key ] ) relative = _print_histogram ( relative , self . _bin_sizes [ "relative" ] ) results [ key ] = LengthHistograms ( target , prediction , relative ) return results