code: def separation_oracle(self, idx, current_solution):
      samp = self.samples[idx]
      dims = len(samp)
      scores = [0, 0, 0]
      # compute scores for each of the three classifiers
      scores[0] = dot(current_solution[0:dims], samp)
      scores[1] = dot(current_solution[dims : 2 * dims], samp)
      scores[2] = dot(current_solution[2 * dims : 3 * dims], samp)
  
      # Add in the loss-augmentation.  Recall that we maximize
      # LOSS(idx,y) + F(X,y) in the separate oracle, not just F(X,y) as we
      # normally would in predict_label(). Therefore, we must add in this
      # extra amount to account for the loss-augmentation. For our simple
      # multi-class classifier, we incur a loss of 1 if we don't predict the
      # correct label and a loss of 0 if we get the right label.
      if self.labels[idx] != 0:
          scores[0] += 1
      if self.labels[idx] != 1:
          scores[1] += 1
      if self.labels[idx] != 2:
          scores[2] += 1
  
      # Now figure out which classifier has the largest loss-augmented score.
      max_scoring_label = scores.index(max(scores))
      # And finally record the loss that was associated with that predicted
      # label. Again, the loss is 1 if the label is incorrect and 0 otherwise.
      if max_scoring_label == self.labels[idx]:
          loss = 0
      else:
          loss = 1
  
      # Finally, return the loss and PSI vector corresponding to the label
      # we just found.
      psi = self.make_psi(samp, max_scoring_label)
      return loss, psi
  
file_path: dlib/python_examples/svm_struct.py
imports: import dlib
label_desc: Use image node_id 4 for calling the ThreeClassClassifierProblem obj's underlying member method code with example usage: obj.separation_oracle(idx, current_solution) and returns: loss,  psi