code: def __call__(self, clf):
      test_time = time.time()
      clf._finalize_coef()
      y_pred = clf.decision_function(self.X).ravel()
      loss = (np.maximum(1 - self.y * y_pred, 0) ** 2).mean()
      coef = clf.coef_.ravel()
      regul = 0.5 * clf.alpha * np.dot(coef, coef)
      self.obj.append(loss + regul)
      self.test_time += time.time() - test_time
      self.times.append(time.time() - self.start_time - self.test_time)
  
file_path: lightning/examples/plot_svrg.py
imports: import sys
  import time
  import numpy
  import matplotlib.pyplot
  from sklearn.datasets import make_classification
  from sklearn.datasets import fetch_20newsgroups_vectorized
  from lightning.classification import SVRGClassifier
label_desc: Use image node_id 2 for calling the Callback obj's underlying member method code with example usage: obj.__call__(clf) without return types