class_docstr: Utility class to track recall@k for various k, split by categories
class_docstr_tok: ["Utility","class","to","track","recall","@","k","for","various","k",",","split","by","categories"]
docstr: Log a negative hit @k for given category
docstr_tok: ["Log","a","negative","hit","@","k","for","given","category"]
code: def add_negative(self, k: int, category: str):
      """Log a negative hit @k for given category"""
      if k not in self.total_byk_bycat:
          raise RuntimeError(f"{k} is not a valid recall threshold")
      self.total_byk_bycat[k][category] += 1
  
imports: import xml.etree.ElementTree
  from collections import defaultdict
  from pathlib import Path
  from typing import Any, Dict, List, Optional, Sequence, Tuple, Union
  import numpy
  from prettytable import PrettyTable
  from tqdm import tqdm
  import json
  import os
  import re
label_desc: Use image node_id 3 for calling the RecallTracker obj's underlying member method code with example usage: obj.add_negative(k, category) without return types