original_docstring: Report basic statistics about feature availability and variable lengths
          across the different subsets of the data.
          
docstring: Report basic statistics about feature availability and variable lengths
  across the different subsets of the data.
docstring_tokens: Report basic statistics about feature availability and variable lengths across the different subsets of the data .
code: def summary_stats(self):
          """Report basic statistics about feature availability and variable lengths
          across the different subsets of the data.
          """
          self.logger.info("Computing feature stats...")
          queries = self.ordered_experts + ["text"]
          for subset, keep in self.partition_lists.items():
              keep = set(keep)
              print(f"Summary for {subset}")
              for expert in queries:
                  if expert in self.features:
                      feats = self.features[expert]
                  else:
                      feats = self.text_features
                  vals = [feats[key] for key in keep]
                  missing = 0
                  sizes = []
                  for val in vals:
                      if self.has_missing_values(val):
                          missing += 1
                      else:
                          sizes.append(len(val))
                  if sizes:
                      stat_str = (f"min: {np.min(sizes):4}, "
                                  f"max: {np.max(sizes):4}, "
                                  f"mean: {np.mean(sizes):.1f}")
                      print(f"{subset}: missing: {missing:4}, {stat_str} {expert}")
code_tokens: def summary_stats ( self ) : self . logger . info ( "Computing feature stats..." ) queries = self . ordered_experts + [ "text" ] for subset , keep in self . partition_lists . items ( ) : keep = set ( keep ) print ( f"Summary for {subset}" ) for expert in queries : if expert in self . features : feats = self . features [ expert ] else : feats = self . text_features vals = [ feats [ key ] for key in keep ] missing = 0 sizes = [ ] for val in vals : if self . has_missing_values ( val ) : missing += 1 else : sizes . append ( len ( val ) ) if sizes : stat_str = ( f"min: {np.min(sizes):4}, " f"max: {np.max(sizes):4}, " f"mean: {np.mean(sizes):.1f}" ) print ( f"{subset}: missing: {missing:4}, {stat_str} {expert}" )
short_docstring: Report basic statistics about feature availability and variable lengths
  across the different subsets of the data.
short_docstring_tokens: Report basic statistics about feature availability and variable lengths across the different subsets of the data .
comment: """Report basic statistics about feature availability and variable lengths
          across the different subsets of the data.
          """