class_docstr: Base dataloader for the Jigsaw Toxic Comment Classification Challenges.
class_docstr_tok: ["Base","dataloader","for","the","Jigsaw","Toxic","Comment","Classification","Challenges","."]
code: def filter_entry_labels(
      self, entry, classes, threshold=0.5, soft_labels=False
  ):
      target = {
          label: -1
          if label not in entry or entry[label] is None
          else entry[label]
          for label in classes
      }
      if not soft_labels:
          target.update(
              {
                  label: 1
                  for label in target
                  if target[label] >= threshold
              }
          )
          target.update(
              {
                  label: 0
                  for label in target
                  if 0 <= target[label] < threshold
              }
          )
      return target
  
imports: import datasets
  import numpy
  import pandas
  import torch
  from torch.utils.data.dataset import Dataset
  from tqdm import tqdm
label_desc: Use image node_id 5 for calling the JigsawData obj's underlying member method code with example usage: obj.filter_entry_labels(entry, classes, threshold, soft_labels) and returns: target