class_docstr: Used to verify that the exaggeration correction implemented in
  `gradient_descent` is correct.
class_docstr_tok: ["Used","to","verify","that","the","exaggeration","correction","implemented","in","`","gradient_descent","`","is","correct","."]
code: def __call__(
      self,
      iteration: int,
      corrected_error: float,
      embedding: TSNEEmbedding,
  ):
      params = self.embedding.gradient_descent_params
      method = params["negative_gradient_method"]
  
      if np.sum(embedding.affinities.P) <= 1:
          log.warning(
              "Are you sure you are testing an exaggerated P matrix?"
          )
  
      if method == "fft":
          f = partial(
              kl_divergence.kl_divergence_approx_fft,
              n_interpolation_points=params["n_interpolation_points"],
              min_num_intervals=params["min_num_intervals"],
              ints_in_interval=params["ints_in_interval"],
              dof=params["dof"],
          )
      elif method == "bh":
          f = partial(
              kl_divergence.kl_divergence_approx_bh,
              theta=params["theta"],
              dof=params["dof"],
          )
  
      P = self.P
  
      true_error = f(P.indices, P.indptr, P.data, embedding)
      if abs(true_error - corrected_error) > 1e-8:
          raise RuntimeError("Correction term is wrong.")
      else:
          log.info(
              "Corrected: %.4f - True %.4f [eps %.4f]"
              % (
                  corrected_error,
                  true_error,
                  abs(true_error - corrected_error),
              )
          )
  
file_path: openTSNE/openTSNE/callbacks.py
imports: import logging
  from functools import partial
  import numpy
  from scipy.sparse import csr_matrix
  from openTSNE import kl_divergence
  from openTSNE.tsne import TSNEEmbedding
label_desc: Use image node_id 2 for calling the VerifyExaggerationError obj's underlying member method code with example usage: obj.__call__(iteration, corrected_error, embedding) without return types